LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > mod rewrite not working correctly after switch

Reply
 
Thread Tools Display Modes
  #1  
Old 01-17-2012, 10:20 PM
bangsters bangsters is offline
Member
 
Join Date: Dec 2011
Posts: 40
Default mod rewrite not working correctly after switch

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/announce...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 &#37;{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

The above was working fine with apache.
Reply With Quote
  #2  
Old 01-17-2012, 11:32 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
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.
Reply With Quote
  #3  
Old 01-17-2012, 11:46 PM
bangsters bangsters is offline
Member
 
Join Date: Dec 2011
Posts: 40
still the same result.
Reply With Quote
  #4  
Old 01-18-2012, 12:35 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
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>
Reply With Quote
  #5  
Old 01-18-2012, 08:56 AM
bangsters bangsters is offline
Member
 
Join Date: Dec 2011
Posts: 40
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?
Reply With Quote
  #6  
Old 01-18-2012, 10:17 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
pls enable rewrite logging (add "RewriteLogLevel 9" in httpd.conf) to troubleshoot.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:40 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.