.htaccess 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. Options -Indexes
  2. <IfModule mod_php5.c>
  3. php_flag engine 0
  4. </IfModule>
  5. <IfModule mod_php7.c>
  6. php_flag engine 0
  7. </IfModule>
  8. AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
  9. Options -ExecCGI
  10. <FilesMatch ".+\.(ph(p[3457]?|t|tml)|[aj]sp|p[ly]|sh|cgi|shtml?|html?)$">
  11. SetHandler default-handler
  12. </FilesMatch>
  13. <IfModule mod_rewrite.c>
  14. ############################################
  15. ## enable rewrites
  16. Options +FollowSymLinks
  17. RewriteEngine on
  18. ## you can put here your pub/media folder path relative to web root
  19. #RewriteBase /magento/pub/media/
  20. ############################################
  21. ## never rewrite for existing files
  22. RewriteCond %{REQUEST_FILENAME} !-f
  23. ############################################
  24. ## rewrite everything else to index.php
  25. RewriteRule .* ../get.php [L]
  26. </IfModule>
  27. ############################################
  28. ## setting MIME types
  29. # JavaScript
  30. AddType application/javascript js jsonp
  31. AddType application/json json
  32. # CSS
  33. AddType text/css css
  34. # Images and icons
  35. AddType image/x-icon ico
  36. AddType image/gif gif
  37. AddType image/png png
  38. AddType image/jpeg jpg
  39. AddType image/jpeg jpeg
  40. # SVG
  41. AddType image/svg+xml svg
  42. # Fonts
  43. AddType application/vnd.ms-fontobject eot
  44. AddType application/x-font-ttf ttf
  45. AddType application/x-font-otf otf
  46. AddType application/x-font-woff woff
  47. AddType application/font-woff2 woff2
  48. # Flash
  49. AddType application/x-shockwave-flash swf
  50. # Archives and exports
  51. AddType application/zip gzip
  52. AddType application/x-gzip gz gzip
  53. AddType application/x-bzip2 bz2
  54. AddType text/csv csv
  55. AddType application/xml xml
  56. <IfModule mod_headers.c>
  57. <FilesMatch .*\.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$>
  58. Header append Cache-Control public
  59. </FilesMatch>
  60. <FilesMatch .*\.(zip|gz|gzip|bz2|csv|xml)$>
  61. Header append Cache-Control no-store
  62. </FilesMatch>
  63. </IfModule>
  64. <IfModule mod_expires.c>
  65. ############################################
  66. ## Add default Expires header
  67. ## http://developer.yahoo.com/performance/rules.html#expires
  68. ExpiresActive On
  69. # Data
  70. <FilesMatch \.(zip|gz|gzip|bz2|csv|xml)$>
  71. ExpiresDefault "access plus 0 seconds"
  72. </FilesMatch>
  73. ExpiresByType text/xml "access plus 0 seconds"
  74. ExpiresByType text/csv "access plus 0 seconds"
  75. ExpiresByType application/json "access plus 0 seconds"
  76. ExpiresByType application/zip "access plus 0 seconds"
  77. ExpiresByType application/x-gzip "access plus 0 seconds"
  78. ExpiresByType application/x-bzip2 "access plus 0 seconds"
  79. # CSS, JavaScript
  80. <FilesMatch \.(css|js)$>
  81. ExpiresDefault "access plus 1 year"
  82. </FilesMatch>
  83. ExpiresByType text/css "access plus 1 year"
  84. ExpiresByType application/javascript "access plus 1 year"
  85. # Favicon, images, flash
  86. <FilesMatch \.(ico|gif|png|jpg|jpeg|swf|svg)$>
  87. ExpiresDefault "access plus 1 year"
  88. </FilesMatch>
  89. ExpiresByType image/gif "access plus 1 year"
  90. ExpiresByType image/png "access plus 1 year"
  91. ExpiresByType image/jpg "access plus 1 year"
  92. ExpiresByType image/jpeg "access plus 1 year"
  93. ExpiresByType image/svg+xml "access plus 1 year"
  94. # Fonts
  95. <FilesMatch \.(eot|ttf|otf|svg|woff|woff2)$>
  96. ExpiresDefault "access plus 1 year"
  97. </FilesMatch>
  98. ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
  99. ExpiresByType application/x-font-ttf "access plus 1 year"
  100. ExpiresByType application/x-font-otf "access plus 1 year"
  101. ExpiresByType application/x-font-woff "access plus 1 year"
  102. ExpiresByType application/font-woff2 "access plus 1 year"
  103. </IfModule>