Created
March 1, 2013 21:56
-
-
Save qbmarketing/5068167 to your computer and use it in GitHub Desktop.
current htaccess file for eecms
This file contains hidden or 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> | |
# Enable Rewrite Engine | |
# ------------------------------ | |
RewriteEngine On | |
RewriteBase / | |
# Redirect www Requests | |
# ------------------------------ | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] | |
# Redirect index.php Requests | |
# ------------------------------ | |
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] | |
RewriteCond %{THE_REQUEST} !/system/.* | |
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,L] | |
# Standard ExpressionEngine Rewrite | |
# ------------------------------ | |
RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ /index.php/$1 [L] | |
</IfModule> | |
#add Expires | |
# ------------------------------ | |
FileETag MTime Size | |
<IfModule mod_expires.c> | |
<filesmatch "\.(jpg|png|css|js|jpeg|woff|ttf|svg|eot|gif)$"> | |
ExpiresActive on | |
ExpiresDefault "access plus 1 year" | |
</filesmatch> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment