.htaccess 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. #单站点客户线上配置,替换客户站点根目录下的 .htaccess
  2. <IfModule mod_rewrite.c>
  3. RewriteEngine On
  4. RewriteBase /
  5. #setHttpToHttps
  6. RewriteRule ^e2b51970eb0b\.php$ youfindadmin/login.php [L]
  7. </IfModule>
  8. # BEGIN W3TC Browser Cache
  9. <IfModule mod_mime.c>
  10. AddType text/css .css
  11. AddType text/x-component .htc
  12. AddType application/x-javascript .js
  13. AddType application/javascript .js2
  14. AddType text/javascript .js3
  15. AddType text/x-js .js4
  16. AddType video/asf .asf .asx .wax .wmv .wmx
  17. AddType video/avi .avi
  18. AddType image/avif .avif
  19. AddType image/avif-sequence .avifs
  20. AddType image/bmp .bmp
  21. AddType application/java .class
  22. AddType video/divx .divx
  23. AddType application/msword .doc .docx
  24. AddType application/vnd.ms-fontobject .eot
  25. AddType application/x-msdownload .exe
  26. AddType image/gif .gif
  27. AddType application/x-gzip .gz .gzip
  28. AddType image/x-icon .ico
  29. AddType image/jpeg .jpg .jpeg .jpe
  30. AddType image/webp .webp
  31. AddType application/json .json
  32. AddType application/vnd.ms-access .mdb
  33. AddType audio/midi .mid .midi
  34. AddType video/quicktime .mov .qt
  35. AddType audio/mpeg .mp3 .m4a
  36. AddType video/mp4 .mp4 .m4v
  37. AddType video/mpeg .mpeg .mpg .mpe
  38. AddType video/webm .webm
  39. AddType application/vnd.ms-project .mpp
  40. AddType application/x-font-otf .otf
  41. AddType application/vnd.ms-opentype ._otf
  42. AddType application/vnd.oasis.opendocument.database .odb
  43. AddType application/vnd.oasis.opendocument.chart .odc
  44. AddType application/vnd.oasis.opendocument.formula .odf
  45. AddType application/vnd.oasis.opendocument.graphics .odg
  46. AddType application/vnd.oasis.opendocument.presentation .odp
  47. AddType application/vnd.oasis.opendocument.spreadsheet .ods
  48. AddType application/vnd.oasis.opendocument.text .odt
  49. AddType audio/ogg .ogg
  50. AddType video/ogg .ogv
  51. AddType application/pdf .pdf
  52. AddType image/png .png
  53. AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
  54. AddType audio/x-realaudio .ra .ram
  55. AddType image/svg+xml .svg .svgz
  56. AddType application/x-shockwave-flash .swf
  57. AddType application/x-tar .tar
  58. AddType image/tiff .tif .tiff
  59. AddType application/x-font-ttf .ttf .ttc
  60. AddType application/vnd.ms-opentype ._ttf
  61. AddType audio/wav .wav
  62. AddType audio/wma .wma
  63. AddType application/vnd.ms-write .wri
  64. AddType application/font-woff .woff
  65. AddType application/font-woff2 .woff2
  66. AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
  67. AddType application/zip .zip
  68. </IfModule>
  69. <IfModule mod_expires.c>
  70. ExpiresActive On
  71. ExpiresByType text/css A31536000
  72. ExpiresByType text/x-component A31536000
  73. ExpiresByType application/x-javascript A31536000
  74. ExpiresByType application/javascript A31536000
  75. ExpiresByType text/javascript A31536000
  76. ExpiresByType text/x-js A31536000
  77. ExpiresByType video/asf A31536000
  78. ExpiresByType video/avi A31536000
  79. ExpiresByType image/avif A31536000
  80. ExpiresByType image/avif-sequence A31536000
  81. ExpiresByType image/bmp A31536000
  82. ExpiresByType application/java A31536000
  83. ExpiresByType video/divx A31536000
  84. ExpiresByType application/msword A31536000
  85. ExpiresByType application/vnd.ms-fontobject A31536000
  86. ExpiresByType application/x-msdownload A31536000
  87. ExpiresByType image/gif A31536000
  88. ExpiresByType application/x-gzip A31536000
  89. ExpiresByType image/x-icon A31536000
  90. ExpiresByType image/jpeg A31536000
  91. ExpiresByType image/webp A31536000
  92. ExpiresByType application/json A31536000
  93. ExpiresByType application/vnd.ms-access A31536000
  94. ExpiresByType audio/midi A31536000
  95. ExpiresByType video/quicktime A31536000
  96. ExpiresByType audio/mpeg A31536000
  97. ExpiresByType video/mp4 A31536000
  98. ExpiresByType video/mpeg A31536000
  99. ExpiresByType video/webm A31536000
  100. ExpiresByType application/vnd.ms-project A31536000
  101. ExpiresByType application/x-font-otf A31536000
  102. ExpiresByType application/vnd.ms-opentype A31536000
  103. ExpiresByType application/vnd.oasis.opendocument.database A31536000
  104. ExpiresByType application/vnd.oasis.opendocument.chart A31536000
  105. ExpiresByType application/vnd.oasis.opendocument.formula A31536000
  106. ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
  107. ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
  108. ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
  109. ExpiresByType application/vnd.oasis.opendocument.text A31536000
  110. ExpiresByType audio/ogg A31536000
  111. ExpiresByType video/ogg A31536000
  112. ExpiresByType application/pdf A31536000
  113. ExpiresByType image/png A31536000
  114. ExpiresByType application/vnd.ms-powerpoint A31536000
  115. ExpiresByType audio/x-realaudio A31536000
  116. ExpiresByType image/svg+xml A31536000
  117. ExpiresByType application/x-shockwave-flash A31536000
  118. ExpiresByType application/x-tar A31536000
  119. ExpiresByType image/tiff A31536000
  120. ExpiresByType application/x-font-ttf A31536000
  121. ExpiresByType application/vnd.ms-opentype A31536000
  122. ExpiresByType audio/wav A31536000
  123. ExpiresByType audio/wma A31536000
  124. ExpiresByType application/vnd.ms-write A31536000
  125. ExpiresByType application/font-woff A31536000
  126. ExpiresByType application/font-woff2 A31536000
  127. ExpiresByType application/vnd.ms-excel A31536000
  128. ExpiresByType application/zip A31536000
  129. </IfModule>
  130. <IfModule mod_deflate.c>
  131. AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon application/json application/vnd.ms-access video/webm application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
  132. <IfModule mod_mime.c>
  133. # DEFLATE by extension
  134. AddOutputFilter DEFLATE js css htm html xml
  135. </IfModule>
  136. </IfModule>
  137. <FilesMatch "\.(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$">
  138. FileETag MTime Size
  139. <IfModule mod_headers.c>
  140. Header set Pragma "public"
  141. Header append Cache-Control "public"
  142. Header unset Set-Cookie
  143. </IfModule>
  144. </FilesMatch>
  145. <FilesMatch "\.(html|htm|rtf|rtx|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|TXT|XSD|XSL|XML)$">
  146. FileETag MTime Size
  147. <IfModule mod_headers.c>
  148. Header set Pragma "public"
  149. Header set Cache-Control "max-age=3600, public"
  150. </IfModule>
  151. </FilesMatch>
  152. <FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|avif|avifs|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|webm|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|ogv|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|_ttf|wav|wma|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|AVIF|AVIFS|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|WEBP|JSON|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|WEBM|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|OGV|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|_TTF|WAV|WMA|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
  153. FileETag MTime Size
  154. <IfModule mod_headers.c>
  155. Header set Pragma "public"
  156. Header append Cache-Control "public"
  157. Header unset Set-Cookie
  158. </IfModule>
  159. </FilesMatch>
  160. <IfModule mod_headers.c>
  161. Header set Referrer-Policy "no-referrer-when-downgrade"
  162. </IfModule>
  163. # END W3TC Browser Cache
  164. # BEGIN WordPress
  165. # 在“BEGIN WordPress”与“END WordPress”之间的指令(行)是
  166. # 动态生成的,只应被WordPress过滤器修改。
  167. # 任何对标记之间的指令的修改都会被覆盖。
  168. <IfModule mod_rewrite.c>
  169. RewriteEngine On
  170. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  171. RewriteBase /
  172. RewriteRule ^index\.php$ - [L]
  173. RewriteCond %{REQUEST_FILENAME} !-f
  174. RewriteCond %{REQUEST_FILENAME} !-d
  175. RewriteRule . /index.php [L]
  176. </IfModule>
  177. # END WordPress