Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. <IfModule mod_rewrite.c>
  2. RewriteEngine on
  3. RewriteRule ^$ app/webroot/ [L]
  4. RewriteRule (.*) app/webroot/$1 [L]
  5. </IfModule>
  6.  
  7. # Set up caching on static resources for 1 year based on Google recommendations
  8. <IfModule mod_expires.c>
  9. ExpiresActive On
  10. <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|js|css|gif|jpg|jpeg|png|swf)$">
  11. ExpiresDefault A29030400
  12. </FilesMatch>
  13. </IfModule>
  14.  
  15. # Enable compression
  16. <ifmodule mod_deflate.c>
  17. # Insert filter
  18. SetOutputFilter DEFLATE
  19.  
  20. # Netscape 4.x has some problems...
  21. BrowserMatch ^Mozilla/4 gzip-only-text/html
  22.  
  23. # Netscape 4.06-4.08 have some more problems
  24. BrowserMatch ^Mozilla/4\.0[678] no-gzip
  25.  
  26. # MSIE masquerades as Netscape, but it is fine
  27. # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  28.  
  29. # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
  30. # the above regex won't work. You can use the following
  31. # workaround to get the desired effect:
  32. BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
  33.  
  34. # Don't compress images
  35. SetEnvIfNoCase Request_URI \
  36. \.(?:gif|jpe?g|png)$ no-gzip dont-vary
  37.  
  38. # Make sure proxies don't deliver the wrong content
  39. Header append Vary User-Agent env=!dont-vary
  40. </ifmodule>
  41. # Enable compression
  42.  
  43.  
  44.  
  45. #Disable Directory Indexes
  46. Options -Indexes
  47.  
  48. #Force certain types of files to download instead of load in browser
  49. AddType application/octet-stream .csv
  50. AddType application/octet-stream .xls
  51. AddType application/octet-stream .doc
  52. AddType application/octet-stream .avi
  53. AddType application/octet-stream .mpg
  54. AddType application/octet-stream .mov
  55. AddType application/octet-stream .pdf
  56.  
  57. #Ban Malicious IPs
  58. order allow,deny
  59. deny from 1.1.1.1
  60. allow from all
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement