Created
October 4, 2010 18:16
-
-
Save gaker/610182 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
FileETag None | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Force www | |
RewriteCond %{HTTP_HOST} ^example.com$ [NC] | |
RewriteRule ^(.*)$ http://www.example.com$1 [R=301,L] | |
# Uncomment to Remove www, but comment the above 2 lines out. :) | |
# Otherwise the world will nend | |
# RewriteCond %{HTTP_HOST} ^www.example.com$ [NC] | |
# RewriteRule ^(.*)$ http://example.com$1 [R=301,L] | |
# Removes index.php | |
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ /index.php/$1 [L] | |
# If 404s or "No Input File" errors, or every page give the same thing | |
# make it /index.php?/$1 above -- Just adding the question mark | |
</IfModule> | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType text/html "Access plus 1 second" | |
ExpiresByType text/css "Access plus 1 month" | |
ExpiresByType image/gif "Access plus 1 month" | |
ExpiresByType image/png "Access plus 1 month" | |
ExpiresByType image/jpg "Access plus 1 month" | |
ExpiresByType image/jpeg "Access plus 1 month" | |
ExpiresByType text/javascript "Access plus 1 month" | |
ExpiresByType application/pdf "Access plus 1 month" | |
ExpiresByType application/x-download "Access plus 1 month" | |
ExpiresByType application/x-javascript "Access plus 1 month" | |
ExpiresByType application/x-shockwave-flash "Access plus 1 month" | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment