Skip to content

Instantly share code, notes, and snippets.

@Markavian
Created October 7, 2014 18:39
Show Gist options
  • Save Markavian/39f858306cde040e5775 to your computer and use it in GitHub Desktop.
Save Markavian/39f858306cde040e5775 to your computer and use it in GitHub Desktop.
Finally... a .htaccess file that routes correctly on my localhost and the server?
DirectoryIndex site/php/routes/index.php?path=index
<IfModule mod_rewrite.c>
Require all granted
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mkv25.net$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*)$ site/php/routes/index.php?path=$1 [NC,L,QSA]
RewriteBase /
</IfModule>
<IfModule mod_rewrite.c>
Require all granted
RewriteEngine on
RewriteCond %{HTTP_HOST} ^localhost|chii$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*)$ site/php/routes/index.php?path=$1 [NC,L,QSA]
RewriteBase /mkv25/
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment