Closed GoogleCodeExporter closed 9 years ago
Looking at your site I see that your server is not serving the ".pagespeed."
resources. For example:
Request URL: http://cloudaud.io/css/A.reset.css.pagespeed.cf.cY4p0TFV0A.css
Status Code: 301 Moved Permanently
Location: http://cloudaud.io/404
From:
http://cloudaud.io/featured?ModPagespeed=on&ModPagespeedFilters=rewrite_css or
http://cloudaud.io/featured?ModPagespeed=on&ModPagespeedFilters=rewrite_images
Are you using mod_rewrite? Rewrite rules can often conflict with ".pagespeed."
resources. Or do you know of any other reason that your server would be serving
404 for these ".pagespeed." resources?
Original comment by sligocki@google.com
on 10 Nov 2014 at 3:18
Hi, and thanks for your reply.
I had to disable mod_pagespeed for the site because if the issues.
I have now setup a virtual host that points to the exact same directory, but
with mod_pagespeed enabled.
With mod_pagespeed:
http://dev.cloudaud.io/explore
Without mod_pagespeed:
http://cloudaud.io/explore
I have also reinstalled the latest version of mod_pagespeed, and reset the
configuration file.
I also have a varnish front end, but I have tested with and without, and the
issue still persists.
Here is my .htaccess:
AddType application/x-httpd-php .xml
AddType application/x-httpd-php .txt
RewriteEngine on
RewriteRule ^dev/([0-9a-zA-Z-]+) /$1 [NC,L,R=301]
RewriteRule ^dev / [NC,L,R=301]
RewriteRule ^profile/([0-9a-zA-Z-]+) /index.php?p=profile&user=$1 [NC,L]
RewriteRule ^404 /index.php?p=404 [NC,L]
RewriteRule ^reset/([0-9a-zA-Z-]+) /index.php?p=reset&key=$1 [NC,L]
RewriteRule ^passwordreset index.php?p=passwordreset [NC,L]
RewriteRule ^home/([0-9a-zA-Z-]+) /404 [NC,L,R=301]
RewriteRule ^home /index.php?p=home [NC,L]
RewriteRule ^explore/([0-9a-zA-Z-]+) /404 [NC,L,R=301]
RewriteRule ^explore /index.php?p=explore [NC,L]
RewriteRule ^featured/([0-9a-zA-Z-]+) /404 [NC,L,R=301]
RewriteRule ^featured /index.php?p=featured [NC,L]
RewriteRule ^login/([0-9a-zA-Z-]+) /404 [NC,L,R=301]
RewriteRule ^login /index.php?p=login [NC,L]
RewriteRule ^register/([0-9a-zA-Z-]+) /404 [NC,L,R=301]
RewriteRule ^register /index.php?p=register [NC,L]
RewriteRule ^logout/([0-9a-zA-Z-]+) /404 [NC,L,R=301]
RewriteRule ^logout /index.php?p=logout [NC,L]
RewriteRule ^upload/([0-9a-zA-Z-]+) /404 [NC,L,R=301]
RewriteRule ^upload /index.php?p=upload [NC,L]
RewriteRule ^track/([0-9a-zA-Z-]+)/([0-9a-zA-Z-]+)
/index.php?p=track&id=$1&secret=$2 [NC,L]
RewriteRule ^track/([0-9a-zA-Z-]+) /index.php?p=track&id=$1 [NC,L]
RewriteRule ^track /index.php?p=track&id=0 [NC,L]
RewriteRule ^trackA/([0-9a-zA-Z-]+) /index.php?p=trackA&id=$1 [NC,L]
RewriteRule ^cleanup /404 [L]
RewriteRule ^process.php /404 [L,R=301]
RewriteRule ^queue.log /404 [L,R=301]
RewriteRule ^logview /404 [L,R=301]
# Stream security
RewriteCond %{HTTP_REFERER} !cloudaud.io
RewriteRule ^stream/([0-9a-zA-Z-]+) /404 [NC,L,R=301]
#catch-all
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /404 [L,R=301]
Original comment by tho...@ndt-lan.no
on 17 Nov 2014 at 11:11
These are the problem:
#catch-all
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /404 [L,R=301]
These rules are causing all the rewritten resources to be forwarded to /404
because they do not exist on your filesystem.
Try adding in:
RewriteCond %{REQUEST_URI} !^/mod_pagespeed_
So it would be:
#catch-all
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/mod_pagespeed_
RewriteRule ^ /404 [L,R=301]
Original comment by sligocki@google.com
on 17 Nov 2014 at 11:55
Oops also add
RewriteCond %{REQUEST_URI} ![.]pagespeed[.]
So it would be:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ![.]pagespeed[.]
RewriteCond %{REQUEST_URI} !^/mod_pagespeed_
RewriteRule ^ /404 [L,R=301]
Original comment by sligocki@google.com
on 17 Nov 2014 at 11:57
Thanks that solved the problem, and I have now re-enabled it for the main vhost.
Sorry for the false bug report, my bad.
But it seems like the "lazyload_images" filter still is broken. If I enable
that filter, the site loads fine, but all pictures outside of the current
viewport (and some inside it!) won't load at all, even when scrolling to them.
What could cause this?
Original comment by thomas.a...@gmail.com
on 18 Nov 2014 at 2:31
This is actually a common problem, so I will add a note to the FAQ.
Let's open a new bug for that new issue.
Original comment by sligocki@google.com
on 18 Nov 2014 at 4:29
Original comment by sligocki@google.com
on 18 Nov 2014 at 4:31
Aha, I see that this is probably related, so I will add the solution here as
well:
From
http://dev.cloudaud.io/explore?ModPagespeed=on&ModPagespeedFilters=lazyload_imag
es
<img id="track_6" class="wave unselectable" height="70" width="900"
pagespeed_lazy_src="/index.php?p=wave&id=151" alt="waveform"
pagespeed_url_hash="2904038479" src="/pagespeed_static/1.JiBnMqyl6S.gif"
onload="pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);"
pagespeed_lazy_replaced_functions="1">
So we must whitelist /pagespeed_static as well. So perhaps we should just
whitelist all URLs with pagespeed in them:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !pagespeed
RewriteRule ^ /404 [L,R=301]
Does that fix the problem for you?
Original comment by sligocki@google.com
on 18 Nov 2014 at 4:40
Added to the FAQ:
https://developers.google.com/speed/pagespeed/module/faq#mod_rewrite
Original comment by sligocki@google.com
on 20 Nov 2014 at 6:23
Recently page speed has been implemented on our website- there is a functionality for reset password on my website that triggers otp to mobile. After getting otp page redirects to reset password page. Afetr entering otp and clicking on continue i am getting the following error :
clientlibs.js.pagespeed.jm.P4bq0aKKBT.js:8 Uncaught TypeError: Illegal invocation
at K (clientlibs.js.pagespeed.jm.P4bq0aKKBT.js:8)
at a.fn.init.text (clientlibs.js.pagespeed.jm.P4bq0aKKBT.js:8)
at Object.success (resetpassword.js.pagespeed.jm.b8U5GDu-kU.js:1)
at i (clientlibs.js.pagespeed.jm.P4bq0aKKBT.js:8)
at Object.fireWith [as resolveWith] (clientlibs.js.pagespeed.jm.P4bq0aKKBT.js:8)
at z (clientlibs.js.pagespeed.jm.P4bq0aKKBT.js:8)
at XMLHttpRequest.
@Ranjit-Kr You could try disabling the rewrite_javascript to see if that resolves the issue. https://www.modpagespeed.com/doc/config_filters
Note that this issue is old and has been closed a long time ago -- I think it's best to move further discussion to https://groups.google.com/d/topic/mod-pagespeed-discuss
Original issue reported on code.google.com by
tho...@ndt-lan.no
on 9 Nov 2014 at 9:50