Domanda

Ho il seguente nel mio file .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]

L'amministratore del server ha installato Google mod_pagespeed e, naturalmente, perché la cartella non esiste, si registra un errore ogni volta come si tenta di accedere /mod_pagespeed_beacon (e Nessuna statistica vengono registrati).

Che RewriteCond ho bisogno di aggiungere (e dove) in modo /mod_pagespeed_beacon funzionerà?

È stato utile?

Soluzione

Più in generale si può whitelist tutte le risorse con pagespeed nel nome con:

RewriteCond %{REQUEST_URI} !pagespeed

Vedere la nuova sezione nel mod_pagespeed FAQ

Altri suggerimenti

trovato la risposta alla mia domanda. Basta aggiungere la seguente:

RewriteCond %{REQUEST_URI} !^/mod_pagespeed_beacon

Non credo che le questioni in cui nella lista delle condizioni di riscrittura è va.

- Modifica

Ho anche bisogno di quanto segue per accedere alle statistiche:

RewriteCond %{REQUEST_URI} !^/mod_pagespeed_statistics

Ho vBulletin 4 Suite + vBSEO Ha trovato che questa linea in .htaccess risolto il problema

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

Inserisci prima di questa linea in

RewriteRule ^(.+)$ vbseo.php [L,QSA]
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top