我的 .htaccess 文件中有以下内容:
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]
服务器管理员已经安装了 Google mod_pagespeed,当然,因为该文件夹不存在,所以每次尝试访问
/mod_pagespeed_beacon
时都会记录错误(并且没有记录任何统计信息)。我需要添加什么
RewriteCond
(以及添加到哪里)才能使 /mod_pagespeed_beacon
起作用?
最佳答案
更一般地,您可以将名称中带有 pagespeed
的所有资源列入白名单:
RewriteCond %{REQUEST_URI} !pagespeed
查看 new section in the mod_pagespeed FAQ
关于.htaccess - mod_rewrite mod_pagespeed RewriteCond,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4099659/