Hello,
We recently started having the following issue with mod_rewrite. If a client uses the IfModule statement to check on mod_rewrite, it is not found and that part of the code ignored. Example from a Wordpress installation:
.htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
A standard Wordpress Permalinks structure. But, this code is bypassed, pages return a 404 error.
But, if I change the code as follows:
#<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
#</IfModule>
ie: commented out the IfModule statements, then mod_rewrite works correctly.
We upgraded the server to Cpanel 11.28.86 recently, I can't confirm if this is directly related to this upgrade or not (I don't believe it is though).
Server Version: Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.13
It's causing a lot of havoc for our clients as their mod_rewrite rules are not working. Any ideas to point me in the right directory would be greatly appreciated!
Thanks,
David
We recently started having the following issue with mod_rewrite. If a client uses the IfModule statement to check on mod_rewrite, it is not found and that part of the code ignored. Example from a Wordpress installation:
.htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
A standard Wordpress Permalinks structure. But, this code is bypassed, pages return a 404 error.
But, if I change the code as follows:
#<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
#</IfModule>
ie: commented out the IfModule statements, then mod_rewrite works correctly.
We upgraded the server to Cpanel 11.28.86 recently, I can't confirm if this is directly related to this upgrade or not (I don't believe it is though).
Server Version: Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.13
It's causing a lot of havoc for our clients as their mod_rewrite rules are not working. Any ideas to point me in the right directory would be greatly appreciated!
Thanks,
David