我希望这是一个简单的“是”或“否”答案(请说明原因)
Q1:规则在 htaccess 中的放置顺序有关系吗? 由于它们是完全分开的项目:例如
Q2:如果是,我是否应用了正确的顺序? 为了加速 htacces 引擎而不是用不必要的规则使其过载?
Q3:关于在此处禁用/添加什么的任何提示都非常欢迎+1!
# DirectoryIndex index.php /index.php
AddDefaultCharset UTF-8
RewriteEngine on
# Options All
# Options +FollowSymLinks
# Options +FollowSymLinks -Indexes -ExecCGI
# RewriteBase /
#####################################################
<IfModule mod_headers.c>
ExpiresActive On
ExpiresDefault M172800
Header unset ETag
FileETag None
Header unset Pragma
##### STATIC FILES
<FilesMatch "\\.(ico|jpg|png|gif|svg|swf|css|js|fon|ttf|eot|xml|pdf|flv)$">
ExpiresDefault M1209600
Header set Cache-Control "public, max-age=1209600"
</FilesMatch>
##### DYNAMIC PAGES
<FilesMatch "\\.(php)$">
ExpiresDefault M604800
Header set Cache-Control "public, max-age=604800"
</FilesMatch>
</IfModule>
#####################################################
# /page123 and /page123/ will …
Run Code Online (Sandbox Code Playgroud)