.htaccess 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Increase PHP upload limits
  2. php_value upload_max_filesize 20M
  3. php_value post_max_size 25M
  4. php_value memory_limit 256M
  5. php_value max_execution_time 300
  6. php_value max_input_time 300
  7. # Enable compression
  8. <IfModule mod_deflate.c>
  9. AddOutputFilterByType DEFLATE text/plain
  10. AddOutputFilterByType DEFLATE text/html
  11. AddOutputFilterByType DEFLATE text/xml
  12. AddOutputFilterByType DEFLATE text/css
  13. AddOutputFilterByType DEFLATE application/xml
  14. AddOutputFilterByType DEFLATE application/xhtml+xml
  15. AddOutputFilterByType DEFLATE application/rss+xml
  16. AddOutputFilterByType DEFLATE application/javascript
  17. AddOutputFilterByType DEFLATE application/x-javascript
  18. </IfModule>
  19. # Set caching headers
  20. <IfModule mod_expires.c>
  21. ExpiresActive On
  22. ExpiresByType image/jpg "access plus 1 year"
  23. ExpiresByType image/jpeg "access plus 1 year"
  24. ExpiresByType image/gif "access plus 1 year"
  25. ExpiresByType image/png "access plus 1 year"
  26. ExpiresByType text/css "access plus 1 month"
  27. ExpiresByType application/pdf "access plus 1 month"
  28. ExpiresByType text/javascript "access plus 1 month"
  29. ExpiresByType application/javascript "access plus 1 month"
  30. ExpiresByType application/x-shockwave-flash "access plus 1 month"
  31. ExpiresByType image/x-icon "access plus 1 year"
  32. ExpiresDefault "access plus 2 days"
  33. </IfModule>
  34. # Security headers
  35. <IfModule mod_headers.c>
  36. Header always set X-Content-Type-Options nosniff
  37. Header always set X-Frame-Options DENY
  38. Header always set X-XSS-Protection "1; mode=block"
  39. </IfModule>
  40. # Hide .htaccess file
  41. <Files .htaccess>
  42. Order allow,deny
  43. Deny from all
  44. </Files>
  45. # Prevent access to config files
  46. <Files ~ "\.(ini|log|conf)$">
  47. Order allow,deny
  48. Deny from all
  49. </Files>