Discussion:
"SetInputFilter DEFLATE" ignored when using rewriterule
(too old to reply)
Tom Lobato
2014-10-29 12:49:29 UTC
Permalink
"SetInputFilter DEFLATE" is working perfectly when going directly to a test.php.

But when using with rewriterule below, index.php will be called and its input is yet compressed, sounding like the rewriterule is making apache bypass the input filter.

---
SetInputFilter DEFLATE

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
---
Kees Nuyt
2014-10-30 11:55:53 UTC
Permalink
On Wed, 29 Oct 2014 05:49:29 -0700 (PDT), Tom Lobato
Post by Tom Lobato
"SetInputFilter DEFLATE" is working perfectly when going directly to a test.php.
But when using with rewriterule below, index.php will be called and its input is yet compressed, sounding like the rewriterule is making apache bypass the input filter.
---
SetInputFilter DEFLATE
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
---
Not sure if the suggestion below completely applies to your
problem, but perhaps it helps anyway ;)


To force a specific script for all requests, I use:

<VirtualHost *:80>
ServerName ${SERVERNAME}
ServerAdmin ${SERVERNAME}master@${SERVERNAME}.invalid
DocumentRoot "/var/www/html/${SERVERNAME}"
AliasMatch ^/(.*) "/var/www/html/${SERVERNAME}/index.php/$1"
<Directory "/var/www/html/${SERVERNAME}">
<FilesMatch "^.*$>
ForceType application/x-httpd-php
</FilesMatch>
</Directory>
</VirtualHost>


Note that in this example, the directories below documentroot are
ignored. The index.php script then interprets all remaining paths
using $_SERVER['PATH_INFO'] .
--
Kees Nuyt
Loading...