Last active
August 29, 2016 11:12
-
-
Save UltraSimplified/7316293 to your computer and use it in GitHub Desktop.
Custom .htaccess for use on Gandi.net with Codeigniter hiding index.php
Varnish temporarily disabled (for development) see http://blog.ultrasimplified.com/fixing-codeigniter-paths-with-htaccess-on-gandi-net/ for more information
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
# temporarily disable Varnish | |
# to make it easier to test changes | |
Header add Cache-Control "max-age=1" | |
RewriteEngine On | |
# Existing files and directories remain accessible | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^.* - [L] | |
# Redirect the rest | |
RewriteCond $1 !^(index\.php|public|assets|robots\.txt) | |
RewriteRule ^(.*)$ /index.php?/$1 [QSA,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment