Skip to content

Instantly share code, notes, and snippets.

@mithra62
Created April 30, 2013 20:04
Show Gist options
  • Save mithra62/5491504 to your computer and use it in GitHub Desktop.
Save mithra62/5491504 to your computer and use it in GitHub Desktop.
EE .htaccess file
RewriteEngine on
RewriteCond $1 !^(images|pdf|styles|admin.php|js|images|css|scripts|themes|favicon\.ico|robots\.txt|index\.php) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
ExpiresActive on
ExpiresByType application/javascript "access plus 1 months"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 months"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment