mod rewrite not working correctly after switch

bangsters

Well-Known Member
#1
Hi.

Mostly our litespeed upgrade has been working. We have switched our servers to production version of litespeed.

Only problem, for some clients is mod rewrite.

If you go to one of our clients site, like

http://blog.tailoredvps.com/announcements/we-have-got-new-nodes-and-vps-plans/

you will notice that the page layout is no longer displaying correctly.

I believe it has something to do with mod rewrite or the .htaccess file. However, other sites with rewrite on is working fine, so I'm a bit puzzled. Below is the .htaccess file contents:

AddType application/x-httpd-php .php .htm .html .php5

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

The above was working fine with apache.
 

NiteWave

Administrator
#2
strange issue. please try following:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !\.css$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
see what happens.
 

NiteWave

Administrator
#4
please try to remove:
AddType application/x-httpd-php .php .htm .html .php5

and see if it back to normal.

use following rewriterule should fix the issue, but just an workaround.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule (.*\.css) http://tailoredvps.com/$1 [R,L]

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

bangsters

Well-Known Member
#5
Thanks. That fixed the layout, but it's still not going to blog.tailoredvps.com. Instead it still shows the main page of tailoredvps and not the blog.

Any suggestions?
 

bangsters

Well-Known Member
#8
yeah looks like mod rewrite for wordpress isn't working properly. Our other sites using mod rewrite though are fine (zencart sites)... but the wordpress ones are not loading properly....
 

webizen

Well-Known Member
#9
yeah looks like mod rewrite for wordpress isn't working properly. Our other sites using mod rewrite though are fine (zencart sites)... but the wordpress ones are not loading properly....
pls enable rewrite logging to troubleshoot the rewrite rules issue.

for apache vhost, add line "Rewrite Loglevel 9" in httpd.conf

for LSWS native vhost, enable rewrite logging via Admin CP (Configuration => Virtual Hosts => vhost => Rewrite => Enable Rewrite: Yes, Log Level: 9)

rewrite entry should have "[REWRITE]" tag (in error.log or error_log)
 
Top