Mod_rewrite mod_pagespeed RewriteCond

My .htaccess file has the following:

# 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 administrator set Google mod_pagespeed and, of course, because the folder does not exist, it logs an error every time it tries to access /mod_pagespeed_beacon (and statistics are not logged).

What does RewriteCond need to add (and where) for /mod_pagespeed_beacon work?

+4
source share
3 answers

In general, you can use the whitelist of all resources using pagespeed in the name with:

 RewriteCond %{REQUEST_URI} !pagespeed 

See the section in the mod_pagespeed FAQ

+5
source

Found the answer to my question. Just add the following:

 RewriteCond %{REQUEST_URI} !^/mod_pagespeed_beacon 

I don’t think it matters where the list of rewriting conditions is.

- Change

To access the statistics, I also needed the following:

 RewriteCond %{REQUEST_URI} !^/mod_pagespeed_statistics 
+7
source

I have vBulletin 4 Suite + vBSEO Found this line in .htaccess to parse the problem

 # mod_pagespeed RewriteCond %{REQUEST_URI} !(mod_pagespeed_statistics|mod_pagespeed_beacon) [NC] 

Put it before this line in

 RewriteRule ^(.+)$ vbseo.php [L,QSA] 
+2
source

All Articles