Skip to content

Instantly share code, notes, and snippets.

@devLopez
Last active August 16, 2016 13:56
Show Gist options
  • Save devLopez/043c09f47c6b041bd92c7c17f4f8f534 to your computer and use it in GitHub Desktop.
Save devLopez/043c09f47c6b041bd92c7c17f4f8f534 to your computer and use it in GitHub Desktop.
#Configurações para retirar o index.php das urls, deixando-as mais amigáveis
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
# Removes index.php from ExpressionEngine URLs
RewriteCond $1 !^(cms|sistemas|robots\.txt|index\.php) [NC]
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment