Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # secure .htaccess file
- <Files .htaccess>
- order allow,deny
- deny from all
- </Files>
- # EE 404 page for missing pages
- ErrorDocument 404 /404/index
- 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]
- # (Google Adwords) Catch any Google campaigns directed to the home page
- RewriteCond %{REQUEST_URI} ^/$
- RewriteCond %{QUERY_STRING} ^(utm_source=.*)
- RewriteRule ^(.*)$ /index.php? [L,PT]
- # Removes index.php
- RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^(.*)$ /index.php?/$1 [L]
- </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>
- # ----------------------------------------------------------------------
- # Better website experience for IE users
- # ----------------------------------------------------------------------
- <IfModule mod_setenvif.c>
- <IfModule mod_headers.c>
- BrowserMatch MSIE ie
- Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
- Header set X-UA-Compatible "IE=EmulateIE7, IE=9"
- Header set imagetoolbar "no"
- </IfModule>
- </IfModule>
- <IfModule mod_headers.c>
- # Because X-UA-Compatible isn't sent to non-IE (to save header bytes),
- # We need to inform proxies that content changes based on UA
- Header append Vary User-Agent
- # Cache control is set only if mod_headers is enabled, so that's unncessary to declare
- </IfModule>
- Options +FollowSymLinks
- RewriteEngine on
- RewriteRule \.swf$ - [E=no-gzip:1]
Advertisement
Add Comment
Please, Sign In to add comment