Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KalenAnson/24acbbe35c2e7fc966a3 to your computer and use it in GitHub Desktop.
Save KalenAnson/24acbbe35c2e7fc966a3 to your computer and use it in GitHub Desktop.
# 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