3

i've mod_pagespeed installed on my nginx server and i love it.

Recently, i installed AMP posts in my website and all permalink now have the /amp/ at the end of the URL.

The problem is that mod_pagespeed (at this time) doesn't support AMP tag, so the console show me some errors. But when i insert ?PageSpeed=off at the end of the amp URLs, AMP is validated.

So, i'd like, if it's possible, to deactivate mod_pagespeed only for all URLs that have the /amp/ at the end.

The permalink structure is: https://www.example.com/postname/

The permalink structure for AMP is: https://www.example.com/postname/amp/

So, mod_pagespeed should work only on the first permalink structure.

The code that i tried to put into mod_pagespeed is the follow:

pagespeed Disallow “https://*example.com/*/amp/*”;

It isn't refuse by the module, but it don't turn off the pagespeed module on the AMP posts. Can you help me about that?

Many thanks in advance.

Allen Fernandes
  • 1,293
  • 11
  • 18
wrls
  • 85
  • 2
  • 11
  • Would love to get an answer to this also, as PageSpeed is causing loads of AMP validation errors for me too. – Matt Mar 31 '16 at 19:35

1 Answers1

8

Add this in your pagespeed.conf file:

pagespeed Disallow */amp/*;
Matt
  • 383
  • 3
  • 14