I have the following in my .htaccess file:
# 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]
The server admin has installed Google mod_pagespeed and of course, because the folder doesn't exist, it logs an error every time as it tries to access /mod_pagespeed_beacon
(and no stats are logged).
What RewriteCond
do I need to add (and where) so /mod_pagespeed_beacon
will work?
Found the answer to my question. Just add the following:
RewriteCond %{REQUEST_URI} !^/mod_pagespeed_beacon
I don't think it matters where in the list of rewrite conditions is goes.
-- Edit
I also needed the following to access the statistics:
RewriteCond %{REQUEST_URI} !^/mod_pagespeed_statistics
More generally you can whitelist all resources with pagespeed
in the name with:
RewriteCond %{REQUEST_URI} !pagespeed
See the new section in the mod_pagespeed FAQ
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With