.htaccess 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. Options +FollowSymLinks
  2. # BEGIN WordPress
  3. <IfModule mod_rewrite.c>
  4. RewriteEngine On
  5. RewriteBase /wp/
  6. RewriteRule ^index\.php$ - [L]
  7. RewriteCond %{REQUEST_FILENAME} !-f
  8. RewriteCond %{REQUEST_FILENAME} !-d
  9. RewriteRule . /wp/index.php [L]
  10. </IfModule>
  11. # END WordPress
  12. #### Force SSL ####
  13. #RewriteEngine On
  14. #RewriteCond %{HTTPS} !=on
  15. #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  16. #</IfModule>
  17. <IfModule mod_headers.c>
  18. <FilesMatch "\.(eot|otf|tt[cf]|woff)$">
  19. Header set Access-Control-Allow-Origin "*"
  20. </FilesMatch>
  21. </IfModule>
  22. <IfModule mod_headers.c>
  23. Header set X-UA-Compatible "IE=edge"
  24. <FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|tt[cf]|vcf|vtt|webapp|web[mp]|woff|xml|xpi)$">
  25. Header unset X-UA-Compatible
  26. </FilesMatch>
  27. </IfModule>
  28. Header set Cache-Control "max-age=7200, must-revalidate"
  29. <IfModule mod_mime.c>
  30. AddType audio/mp4 m4a f4a f4b
  31. AddType audio/ogg oga ogg opus
  32. AddType application/json json map
  33. AddType application/ld+json jsonld
  34. AddType application/javascript js
  35. AddType video/mp4 f4v f4p m4v mp4
  36. AddType video/ogg ogv
  37. AddType video/webm webm
  38. AddType video/x-flv flv
  39. AddType application/font-woff woff
  40. AddType application/vnd.ms-fontobject eot
  41. AddType application/x-font-ttf ttc ttf
  42. AddType font/opentype otf
  43. AddType image/svg+xml svgz
  44. AddEncoding gzip svgz
  45. AddType application/octet-stream safariextz
  46. AddType application/x-chrome-extension crx
  47. AddType application/x-web-app-manifest+json webapp
  48. AddType application/xml atom rdf rss xml
  49. AddType image/x-icon cur
  50. AddType text/cache-manifest appcache manifest
  51. AddType text/x-vcard vcf
  52. </IfModule>
  53. <IfModule mod_mime.c>
  54. AddCharset utf-8 .atom .css .js .json .jsonld .rss .vtt .webapp .xml
  55. </IfModule>
  56. <IfModule mod_expires.c>
  57. ExpiresActive on
  58. ExpiresDefault "access plus 1 month"
  59. ExpiresByType text/html "access plus 0 seconds"
  60. ExpiresByType text/css "access plus 1 year"
  61. ExpiresByType image/jpeg "access plus 1 year"
  62. ExpiresByType image/png "access plus 1 year"
  63. ExpiresByType application/javascript "access plus 1 year"
  64. ExpiresByType text/javascript "access plus 1 year"
  65. ExpiresByType text/javascript A2592000
  66. ExpiresByType image/x-icon "access plus 1 week"
  67. ExpiresByType text/x-component "access plus 1 month"
  68. ExpiresByType audio/ogg "access plus 1 month"
  69. ExpiresByType image/gif "access plus 1 month"
  70. ExpiresByType video/mp4 "access plus 1 month"
  71. ExpiresByType video/ogg "access plus 1 month"
  72. ExpiresByType video/webm "access plus 1 month"
  73. ExpiresByType application/font-woff "access plus 1 month"
  74. ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
  75. ExpiresByType application/x-font-ttf "access plus 1 month"
  76. ExpiresByType font/opentype "access plus 1 month"
  77. ExpiresByType image/svg+xml "access plus 1 month"
  78. ExpiresByType text/xml "access plus 0 seconds"
  79. ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
  80. ExpiresByType text/cache-manifest "access plus 0 seconds"
  81. ExpiresByType application/json "access plus 0 seconds"
  82. ExpiresByType application/ld+json "access plus 0 seconds"
  83. ExpiresByType application/xml "access plus 0 seconds"
  84. ExpiresByType application/atom+xml "access plus 1 hour"
  85. ExpiresByType application/rss+xml "access plus 1 hour"
  86. </IfModule>
  87. <IfModule mod_deflate.c>
  88. <IfModule mod_setenvif.c>
  89. <IfModule mod_headers.c>
  90. SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
  91. RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  92. </IfModule>
  93. </IfModule>
  94. <IfModule mod_filter.c>
  95. AddOutputFilterByType DEFLATE application/atom+xml \
  96. application/javascript \
  97. application/json \
  98. application/ld+json \
  99. application/rss+xml \
  100. application/vnd.ms-fontobject \
  101. application/x-font-ttf \
  102. application/x-web-app-manifest+json \
  103. application/xhtml+xml \
  104. application/xml \
  105. font/opentype \
  106. image/svg+xml \
  107. image/x-icon \
  108. text/css \
  109. text/html \
  110. text/plain \
  111. text/x-component \
  112. text/xml
  113. </IfModule>
  114. </IfModule>
  115. <IfModule mod_headers.c>
  116. Header unset ETag
  117. </IfModule>
  118. FileETag None
  119. <IfModule mod_setenvif.c>
  120. <IfModule mod_headers.c>
  121. <FilesMatch "\.(cur|gif|ico|jpe?g|png|svgz?|webp)$">
  122. SetEnvIf Origin ":" IS_CORS
  123. Header set Access-Control-Allow-Origin "*" env=IS_CORS
  124. </FilesMatch>
  125. </IfModule>
  126. </IfModule>
  127. <IfModule mod_headers.c>
  128. Header set X-Frame-Options "DENY"
  129. <FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|tt[cf]|vcf|vtt|webapp|web[mp]|woff|xml|xpi)$">
  130. Header unset X-Frame-Options
  131. </FilesMatch>
  132. </IfModule>
  133. <IfModule mod_autoindex.c>
  134. Options -Indexes
  135. </IfModule>
  136. <IfModule mod_rewrite.c>
  137. RewriteCond %{SCRIPT_FILENAME} -d [OR]
  138. RewriteCond %{SCRIPT_FILENAME} -f
  139. RewriteRule "(^|/)\." - [F]
  140. </IfModule>
  141. <FilesMatch "(^#.*#|\.(bak|config|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$">
  142. <IfModule !mod_authz_core.c>
  143. Order allow,deny
  144. Deny from all
  145. Satisfy All
  146. </IfModule>
  147. <IfModule mod_authz_core.c>
  148. Require all denied
  149. </IfModule>
  150. </FilesMatch>
  151. <IfModule mod_headers.c>
  152. Header set X-Content-Type-Options "nosniff"
  153. </IfModule>
  154. <IfModule mod_headers.c>
  155. Header set X-XSS-Protection "1; mode=block"
  156. <FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|tt[cf]|vcf|vtt|webapp|web[mp]|woff|xml|xpi)$">
  157. Header unset X-XSS-Protection
  158. </FilesMatch>
  159. </IfModule>