Created
September 16, 2014 22:34
-
-
Save mjuhl/01b8ff0424929c3cabf9 to your computer and use it in GitHub Desktop.
How to do that Apache rewrite thingy where everything goes to index.php except static assets
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
# secure htaccess file | |
<Files .htaccess> | |
order allow,deny | |
deny from all | |
</Files> | |
RewriteEngine on | |
# redirect everything to index.php, except files in /a and index.php | |
RewriteCond %{REQUEST_URI} !(a/|index\.php) | |
RewriteRule (.*) index.php?%{QUERY_STRING}&request_uri=$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment