Created
November 8, 2012 01:08
-
-
Save pstinnett/4035747 to your computer and use it in GitHub Desktop.
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
<IfModule mod_rewrite.c> | |
Options +FollowSymlinks | |
RewriteEngine On | |
RewriteBase / | |
# Redirect www to non www | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] | |
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L] | |
# Redirect index.php Requests | |
RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC] | |
RewriteCond %{THE_REQUEST} ^GET | |
RewriteRule ^index\.php(.*) $1 [R=301,L] | |
# EE sponsored method to remove index.php from requests | |
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ /index.php/$1 [L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment