Created
January 26, 2012 10:49
-
-
Save mapkyca/1682208 to your computer and use it in GitHub Desktop.
Apache mod_rewrite rule to pass requests to a PHP page handler, but only if the file or folder doesn't physically exist.
This file contains 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> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ path/to/pagehandler.php?page=$1 [QSA] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment