0

I have a PHP script that scraps a page and rewrites it in a different way with a different layout etc.

On the top of the PHP generated page I have a serie of <link rel=stylesheet href=*.css>.

I've updated my server yesterday and today I've noticed that mod_pagespeed is messing up with these links.

I get:

<link href="http://example.com/A.mycss1.css+css,,_v3,,_style.css,,qv==2+css,,_v3,,_typography.css,,qv==1+css,,_v3,,_responsive.css,Mcc.i_KwDiEdXd.css.pagespeed.cf.ybNw-Cca4d.css" rel="stylesheet">

And obviously it breaks the entire page layout.

I've tired disabling mod_pagespeed within .htaccess:

ModPagespeed off

But the result is the same. How can I fix it?

Atm I've disabled it globally but I'd like to understand how to fix the problem.

Fez Vrasta
  • 14,110
  • 21
  • 98
  • 160

2 Answers2

0

This URL is the expected result of the combine_css and rewrite_css filters. combine_css combines multiple CSS files into one and leaves URLs like foo.css+bar.css.pagespeed.cc.hash.css. rewrite_css minifies and rewrites the images inside CSS. These should not be breaking the layout of your page.

However, as a temporary work-around you could add:

ModPagespeedDisableFilters combine_css

to your config file. Editing .htaccess should also work, but you have to edit .htaccess for the HTML file directory, not the CSS directory.

But as I said before, it's surprising that this is breaking your page. Please send us an email at https://groups.google.com/forum/#!forum/mod-pagespeed-discuss so that we can find the root of the problem.

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

I had the same issue with a messed up stylesheet so I tried to disable combine_css and that did not fix everything, so I added a disable on rewrite_css too.

Using cpanel, please check https://documentation.cpanel.net/display/EA4/Modify+Apache+Virtual+Hosts+with+Include+Files#82e9ab17b6bb4803b5834eecb7e0ef57 to see how to update your autogenerated .conf file without editing it directly.

Blair Lowe
  • 21
  • 3