mod pagespeed browsing wrong folder structure to fetch image paths

44 views
Skip to first unread message

SAI PRASAD

unread,
Mar 28, 2018, 8:08:51 AM3/28/18
to mod-pagespeed-discuss
Hi All,

I am getting 404 errors for images which are present in a css file as "background-image: url(sample.png)" and "background-image: url(images/sample1.png)".

Suppose, my css path like "wp-content/ui/css/sample.css". In sample.css, if i defined background image as "url(images/sample1.png", mod page speed is looking the 'sample1.png' in es the path like 'wp-content/ui/css/images/sample1.png'. But actual folder path/structure for that image like 'wp-content/ui/images/sample1.png'.

How to tell the modpagespeed to browse/fetch image from one step before the actual directory.

I have so many css files like this. So i can't replace like "background-image: url(../images/sample1.png)"

Please provide solution for this.

Otto van der Schaaf

unread,
Mar 28, 2018, 8:21:29 AM3/28/18
to mod-pagesp...@googlegroups.com
I feel that correcting the original resource references is probably the most robust way to address 404's,
but if you want to have mod_pagespeed fix this:

Alternative fetching can be set up through configuration:
https://www.modpagespeed.com/doc/domains#mapping_origin 

It sounds like rewriting of references in the html/css should also be done to
prevent the browser from running into the same problem:

Otto


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/6d87e875-4d1e-498d-a8fc-9ce053bed21f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

SAI PRASAD

unread,
Mar 28, 2018, 8:29:58 AM3/28/18
to mod-pagespeed-discuss
Thank you very much otto.

I am already using " ModPagespeedMapOriginDomain "

So should i use "ModPagespeedEnableFilters rewrite_domains" ?


---
Regards,
prasad.
 
 
Message has been deleted
Message has been deleted

SAI PRASAD

unread,
Mar 29, 2018, 5:42:34 AM3/29/18
to mod-pagespeed-discuss
Hi Otto,

I used modpagespeed domain and rewritedomains also in htaccess file.

Eg: 
   ModPagespeedMapOriginDomain  10.XX.XX.XX https://*********.***
  ModPagespeedEnableFilters rewrite_domains

It's not worked.
I am getting same type of errors.

Reply all
Reply to author
Forward
0 new messages