.htaccess 7.9 KB

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