how to disable page speed on specific url?

Tom picture Tom · Sep 17, 2014 · Viewed 8.5k times · Source

I am currently using page speed on my new website, very happy about it. but i just realised that my /phpmyadmin in now blank.

i know it's because of pagespeed because when i go to /phpmyadmin/?PageSpeed=off; it works again.

So the idea is to disable pagespeed only on /phpmyadmin and /phpmyadmin/* the /phpmyadmin link is made with a symbolic link.

I'm using apache2.

Here is what i have in my vhost .conf file

    <Directory /var/www/mywebsite/>

            AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript

            #ModPagespeedEnableFilters lazyload_images,defer_javascript,insert_dns_prefetch,collapse_whitespace

            ModPagespeedEnableFilters lazyload_images,combine_javascript,defer_javascript,combine_css

            RewriteBase /
            RewriteRule ^index\.php$ - [L]
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule . /index.php [L]

            FileETag none

            ExpiresActive On
            ExpiresDefault "access plus 5 seconds"
            ExpiresByType image/x-icon "access plus 2500000 seconds"
            ExpiresByType image/jpeg "access plus 2500000 seconds"
            ExpiresByType image/png "access plus 2500000 seconds"
            ExpiresByType image/gif "access plus 2500000 seconds"
            ExpiresByType application/x-shockwave-flash "access plus 2500000 seconds"
            ExpiresByType text/css "access plus 600000 seconds"
            ExpiresByType text/javascript "access plus 200000 seconds"
            ExpiresByType application/javascript "access plus 200000 seconds"
            ExpiresByType application/x-javascript "access plus 200000 seconds"
            ExpiresByType text/html "access plus 600 seconds"
            ExpiresByType application/xhtml+xml "access plus 600 seconds"

            Options -Indexes
            AllowOverride All

    </Directory>

any idea community ?

thanks a lot !!

Answer

sligocki picture sligocki · Sep 17, 2014

You can use normal apache location blocks:

<Location "/phpmyadmin">
  ModPagespeed off
</Location>

Or the mod_pagespeed specific directive:

ModPagespeedDisallow "*/phpmyadmin/*"