Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/241.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为.php文件指定缓存验证程序_Php_.htaccess_Caching_Validation_Last Modified - Fatal编程技术网

为.php文件指定缓存验证程序

为.php文件指定缓存验证程序,php,.htaccess,caching,validation,last-modified,Php,.htaccess,Caching,Validation,Last Modified,我进行了PageSpeed测试,结果显示: 以下资源缺少缓存验证程序。无法高效地刷新未指定缓存验证程序的资源。指定上次修改的头或ETag头以启用以下资源的缓存验证:cssLoader.php My.htaccess已通过WPSuperCache自动重写,如下所示: <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 1 mo

我进行了PageSpeed测试,结果显示:

以下资源缺少缓存验证程序。无法高效地刷新未指定缓存验证程序的资源。指定上次修改的头或ETag头以启用以下资源的缓存验证:cssLoader.php

My.htaccess已通过WPSuperCache自动重写,如下所示:

<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault                                      "access plus 1 month"
ExpiresByType text/css                              "access plus 1 year"
ExpiresByType application/json                      "access plus 0 seconds"
ExpiresByType application/ld+json                   "access plus 0 seconds"
ExpiresByType application/vnd.geo+json              "access plus 0 seconds"
ExpiresByType application/xml                       "access plus 0 seconds"
ExpiresByType text/xml                              "access plus 0 seconds"
ExpiresByType image/x-icon                          "access plus 1 week"
ExpiresByType text/x-component                      "access plus 1 month"
ExpiresByType text/html                             "access plus 0 seconds"
ExpiresByType application/javascript                "access plus 1 year"
ExpiresByType application/manifest+json             "access plus 1 year"
ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
ExpiresByType text/cache-manifest                   "access plus 0 seconds"
ExpiresByType audio/ogg                             "access plus 1 month"
ExpiresByType image/gif                             "access plus 1 month"
ExpiresByType image/jpeg                            "access plus 1 month"
ExpiresByType image/png                             "access plus 1 month"
ExpiresByType video/mp4                             "access plus 1 month"
ExpiresByType video/ogg                             "access plus 1 month"
ExpiresByType video/webm                            "access plus 1 month"
ExpiresByType application/atom+xml                  "access plus 1 hour"
ExpiresByType application/rss+xml                   "access plus 1 hour"
ExpiresByType application/font-woff                 "access plus 1 month"
ExpiresByType application/font-woff2                "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject         "access plus 1 month"
ExpiresByType application/x-font-ttf                "access plus 1 month"
ExpiresByType font/opentype                         "access plus 1 month"
ExpiresByType image/svg+xml                         "access plus 1 month"
</IfModule>
# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{HTTPS} on
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz -f
RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{HTTPS} !on
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz -f
RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz" [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
RewriteCond %{HTTPS} on
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html -f
RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html" [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
RewriteCond %{HTTPS} !on
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -f
RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html" [L]
</IfModule>

# END WPSuperCache


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

过期于
ExpiresDefault“访问加1个月”
ExpiresByType文本/css“访问加1年”
ExpiresByType应用程序/json“访问加0秒”
ExpiresByType应用程序/ld+json“访问加0秒”
ExpiresByType应用程序/vnd.geo+json“访问加0秒”
ExpiresByType应用程序/xml“访问加0秒”
ExpiresByType text/xml“访问加0秒”
ExpiresByType图像/x图标“访问加1周”
ExpiresByType文本/x组件“访问加1个月”
ExpiresByType text/html“访问加0秒”
ExpiresByType应用程序/javascript“访问加1年”
ExpiresByType应用程序/清单+json“访问加1年”
ExpiresByType应用程序/x-web-app-manifest+json“访问加0秒”
ExpiresByType文本/缓存清单“访问加0秒”
ExpiresByType音频/ogg“访问加1个月”
ExpiresByType image/gif“访问加1个月”
过期按类型图像/jpeg“访问加1个月”
ExpiresByType图像/png“访问加1个月”
按类型视频/mp4“访问加1个月”过期
按类型视频/ogg“访问加1个月”过期
过期按类型视频/webm“访问加1个月”
ExpiresByType应用程序/atom+xml“访问加1小时”
ExpiresByType应用程序/rss+xml“访问加1小时”
过期按类型应用程序/font woff“访问加1个月”
ExpiresByType应用程序/font-woff2“访问加1个月”
ExpiresByType应用程序/vnd.ms-fontobject“访问加1个月”
按类型应用程序到期/x-font-ttf“访问加1个月”
ExpiresByType字体/opentype“访问加1个月”
ExpiresByType图像/svg+xml“访问加1个月”
#开始超级缓存
重新启动发动机
重写基/
#如果您从代理后面提供页面,您可能希望将“RewriteCond%{HTTPS}on”更改为更合理的格式
AddDefaultCharset UTF-8
重写cond%{REQUEST_URI}!^*[^/]$
重写条件%{REQUEST_URI}!^.*//*$
重写cond%{REQUEST_METHOD}!邮递
重写条件%{QUERY_STRING}!。*=*
重写cond%{HTTP:Cookie}!^*(评论|作者| wordpress |登录| wp-postpass |)*$
重写cond%{HTTP:X-Wap-Profile}^[a-z0-9\“]+[NC]
重写cond%{HTTP:Profile}!^[a-z0-9\“]+[NC]
重写cond%{HTTP\u USER\u AGENT}!^*2.0\MMP-2.0\MMP-3.0\MMP-3.0\MMP-3.0\MMP-10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10| PortalMM | Proxinet | Proxinet | SHARP-TQ-GX10 | SHG-i900 | Small | SonyEricsson | Symbian\OS | SymbianOS | TS21i-10 | UP.Browser | UP.Link | webOS | Windows\CE | WinWAP | yahooseker/M1A1-R2D2 | iPhone | iPod | Android | BlackBerry9530 | LG-TU915\Obigo | LGE\VX | webOS | Nokia5800.*[NC]
RewriteCond%{HTTP\u user\u agent}^(W3 c)W3 c c四四个c四四个c四个c四个c四个c四个c四个c四个c四四个c四个c四个c四四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c(1240)MoB-摩托——摩托——摩托——摩托——摩托——摩押——摩押——摩押——摩押——摩押——摩押——摩押——摩押——摩押——摩押——摩押——摩押——nec——摩押——毛毛毛尼——MaMaMai/124)、MAU——MAU——MAU——MAU——MAU——MAU——MAO——MAO——MAO——MAO——MAO——MAU——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAS——MAO——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——M——M——M——M——M——M——M——M——M——M——M——M——M——M——M——M——M smar |索尼| sph | symb | t-mo | teli | tim | tosh | tsm | upg1 | upsi | vk-v | voda | wap | wapi | wapp | wapr | webc | winw | winw | xda | xda-.[NC]
RewriteCond%{HTTP:Accept Encoding}gzip
在上重写cond%{HTTPS}
重写cond%{DOCUMENT_ROOT}/wp content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz-f
重写规则^(.*)“/wp content/cache/supercache/%{SERVER_NAME}/$1/index https.html.gz”[L]
重写cond%{REQUEST_URI}!^*[^/]$
重写条件%{REQUEST_URI}!^.*//*$
重写cond%{REQUEST_METHOD}!邮递
重写条件%{QUERY_STRING}!。*=*
重写cond%{HTTP:Cookie}!^*(评论|作者| wordpress |登录| wp-postpass |)*$
重写cond%{HTTP:X-Wap-Profile}^[a-z0-9\“]+[NC]
重写cond%{HTTP:Profile}!^[a-z0-9\“]+[NC]
重写cond%{HTTP\u USER\u AGENT}!^*2.0\MMP-2.0\MMP-3.0\MMP-3.0\MMP-3.0\MMP-10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10| PortalMM | Proxinet | Proxinet | SHARP-TQ-GX10 | SHG-i900 | Small | SonyEricsson | Symbian\OS | SymbianOS | TS21i-10 | UP.Browser | UP.Link | webOS | Windows\CE | WinWAP | yahooseker/M1A1-R2D2 | iPhone | iPod | Android | BlackBerry9530 | LG-TU915\Obigo | LGE\VX | webOS | Nokia5800.*[NC]
RewriteCond%{HTTP\u user\u agent}^(W3 c)W3 c c四四个c四四个c四个c四个c四个c四个c四个c四个c四四个c四个c四个c四四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c四个c(1240)MoB-摩托——摩托——摩托——摩托——摩托——摩押——摩押——摩押——摩押——摩押——摩押——摩押——摩押——摩押——摩押——摩押——摩押——nec——摩押——毛毛毛尼——MaMaMai/124)、MAU——MAU——MAU——MAU——MAU——MAU——MAO——MAO——MAO——MAO——MAO——MAU——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAO——MAS——MAO——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——MAS——M——M——M——M——M——M——M——M——M——M——M——M——M——M——M——M——M smar |索尼| sph | symb | t-mo | teli | tim | tosh | tsm | upg1 | upsi | vk-v | voda | wap | wapi | wapp | wapr | webc | winw | winw | xda | xda-.[NC]
RewriteCond%{HTTP:Accept Encoding}gzip
重写cond%{HTTPS}!在…上
重写cond%{DOCUMENT_ROOT}/wp content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz-f
重写规则^(.*)”/wp content/cache/supercache/%{SERVER_NAME}/$1/inde