Forum Moderators: phranque
I've just enabled mod_deflate to allow compression on the server, but it seems that some pages do not compress.
Directory root will compress, but anything that is using mod-rewrite doesn't compress
httpd.conf file looks like this:
LoadModule deflate_module modules/mod_deflate.so
...
<Location />
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif¦jpe?g¦png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
</Location>
.htaccess file looks like this:
RewriteEngine On
RewriteBase /
# remove .php; use THE_REQUEST to prevent infinite loops
RewriteCond %{THE_REQUEST} ^GET\ (.*)\.php\ HTTP
RewriteRule (.*)\.php$ $1 [R=301]
# remove index
RewriteRule (.*)/index$ $1/ [R=301]
# remove slash if not directory
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*)/ $1 [R=301]
# add .php to access file, but don't redirect
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.php [L]
Any ideas? As it seems quite a lot of you have Compression working with Clean URL's.
Cheers for any help,
Dan
[edited by: jdMorgan at 8:44 pm (utc) on June 20, 2007]
[edit reason] Removed URLs. Please See TOS. [/edit]