4

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?

Darryl Hein
  • 142,451
  • 95
  • 218
  • 261
  • FYI, you can contact us at mod-pagespeed-discuss@googlegroups.com and list issues at http://code.google.com/p/modpagespeed/issues/list – sligocki Nov 05 '10 at 17:55

3 Answers3

7

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
Darryl Hein
  • 142,451
  • 95
  • 218
  • 261
5

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

sligocki
  • 6,246
  • 5
  • 38
  • 47
2

I have vBulletin 4 Suite + vBSEO Found that this line in .htaccess sorted out the problem

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

Place it before this line in

RewriteRule ^(.+)$ vbseo.php [L,QSA]
thomas
  • 21
  • 1