Last active
June 22, 2024 22:19
-
-
Save nextab/4c990cab94dadd340f2a880b98d67745 to your computer and use it in GitHub Desktop.
This little snippet allows the system to have a php script (in the example edg-protected-file.php) handle a URL IF it's for a file (!) that's located under /wp-content/uploads/gesichert/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <IfModule mod_rewrite.c> | |
| # Überprüfe, ob die Anfrage für eine Datei gilt. | |
| RewriteCond %{REQUEST_FILENAME} -f | |
| # Anstatt die Datei direkt per URL auszuliefern, übermittle die Anfrage an ein PHP-Skript, das die Validierung erledigt. | |
| RewriteRule ^wp-content/uploads/gesichert/(.*)$ edg-protected-file.php?file=$1 [QSA,L] | |
| </IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment