Guest User

Untitled

a guest
Jun 12th, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. # secure .htaccess file
  2. <Files .htaccess>
  3. order allow,deny
  4. deny from all
  5. </Files>
  6.  
  7. # EE 404 page for missing pages
  8. ErrorDocument 404 /404/index
  9.  
  10. FileETag None
  11.  
  12. <IfModule mod_rewrite.c>
  13. RewriteEngine On
  14. # Force www
  15. RewriteCond %{HTTP_HOST} ^example.com$ [NC]
  16. RewriteRule ^(.*)$ http://www.example.com$1 [R=301,L]
  17. # (Google Adwords) Catch any Google campaigns directed to the home page
  18. RewriteCond %{REQUEST_URI} ^/$
  19. RewriteCond %{QUERY_STRING} ^(utm_source=.*)
  20. RewriteRule ^(.*)$ /index.php? [L,PT]
  21. # Removes index.php
  22. RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
  23. RewriteCond %{REQUEST_FILENAME} !-f
  24. RewriteCond %{REQUEST_FILENAME} !-d
  25. RewriteRule ^(.*)$ /index.php?/$1 [L]
  26. </IfModule>
  27.  
  28. <IfModule mod_expires.c>
  29. ExpiresActive On
  30. ExpiresByType text/html "access plus 1 second"
  31. ExpiresByType text/css "access plus 1 month"
  32. ExpiresByType image/gif "access plus 1 month"
  33. ExpiresByType image/png "access plus 1 month"
  34. ExpiresByType image/jpg "access plus 1 month"
  35. ExpiresByType image/jpeg "access plus 1 month"
  36. ExpiresByType text/javascript "access plus 1 month"
  37. ExpiresByType application/pdf "access plus 1 month"
  38. ExpiresByType application/x-download "access plus 1 month"
  39. ExpiresByType application/x-javascript "access plus 1 month"
  40. ExpiresByType application/x-shockwave-flash "access plus 1 month"
  41. </IfModule>
  42.  
  43. # ----------------------------------------------------------------------
  44. # Better website experience for IE users
  45. # ----------------------------------------------------------------------
  46.  
  47. <IfModule mod_setenvif.c>
  48. <IfModule mod_headers.c>
  49. BrowserMatch MSIE ie
  50. Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
  51. Header set X-UA-Compatible "IE=EmulateIE7, IE=9"
  52. Header set imagetoolbar "no"
  53. </IfModule>
  54. </IfModule>
  55.  
  56. <IfModule mod_headers.c>
  57. # Because X-UA-Compatible isn't sent to non-IE (to save header bytes),
  58. # We need to inform proxies that content changes based on UA
  59. Header append Vary User-Agent
  60. # Cache control is set only if mod_headers is enabled, so that's unncessary to declare
  61. </IfModule>
  62.  
  63. Options +FollowSymLinks
  64. RewriteEngine on
  65. RewriteRule \.swf$ - [E=no-gzip:1]
Advertisement
Add Comment
Please, Sign In to add comment