Skip to content

Instantly share code, notes, and snippets.

@franzos
Created August 27, 2014 13:36
Show Gist options
  • Save franzos/c9b0ba318e3c4739aec2 to your computer and use it in GitHub Desktop.
Save franzos/c9b0ba318e3c4739aec2 to your computer and use it in GitHub Desktop.
RewriteEngine On
RewriteBase /
# Removes index.php from ExpressionEngine URLs
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{QUERY_STRING} !=""
RewriteCond %{QUERY_STRING} !page=supportcp
RewriteRule ^index\.php$ /support/? [R,NC,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment