Skip to content

Instantly share code, notes, and snippets.

@mjuhl
Created September 16, 2014 22:34
Show Gist options
  • Save mjuhl/01b8ff0424929c3cabf9 to your computer and use it in GitHub Desktop.
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
# 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