Skip to content

Instantly share code, notes, and snippets.

@nanoninja
Created May 22, 2017 09:50
Show Gist options
  • Save nanoninja/58e4500c055f79aa024aaf7c64c86277 to your computer and use it in GitHub Desktop.
Save nanoninja/58e4500c055f79aa024aaf7c64c86277 to your computer and use it in GitHub Desktop.
Apache Rewrite Rules
# public/.htaccess
RewriteBase /mvc2/public
# NC == INSENSITIVE CASE
# L == LAST RULE
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment