GiarcTNA
GiarcTNA

Reputation: 499

Disable Mod Pagespeed for specific URL via htaccess

I am trying to disable mod_pagespeed from running at all on a specific URL by adding a condition to .htaccess. I only have access to .htaccess.

When I add this:

<Location "/web/*">
    ModPagespeed off
</Location>

I get a server error.

I am needing any URL that starts with /web/ to have ModPagespeed disabled. So /web/page1/ /web/page2/ as well.

How would I do this?

Upvotes: 0

Views: 1837

Answers (1)

GiarcTNA
GiarcTNA

Reputation: 499

Answering my own question. It's very simply:

<IfModule pagespeed_module>
    ModPagespeed on
    ModPagespeedDisallow "*/web/*"
</IfModule>

Upvotes: 1

Related Questions