Skip to content

Instantly share code, notes, and snippets.

@geff21st
Last active September 8, 2017 03:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geff21st/fd85e057d1bda1d409cecd3be98b33f7 to your computer and use it in GitHub Desktop.
Save geff21st/fd85e057d1bda1d409cecd3be98b33f7 to your computer and use it in GitHub Desktop.
# Removes index.php from ExpressionEngine URLs
RewriteCond %{REQUEST_URI} !^/bitrix/
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [L,NE,R] # <- for test, for prod use [L,NE,R=301]
# Adds trailing slashes
RewriteCond %{REQUEST_URI} !^/bitrix/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ /$1/ [L,NE,R] # <- for test, for prod use [L,NE,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment