LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Install/Configuration (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=11)
-   -   mod rewrite not working correctly after switch (http://www.litespeedtech.com/support/forum/showthread.php?t=5640)

bangsters 01-17-2012 10:20 PM

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.

NiteWave 01-17-2012 11:32 PM

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.

bangsters 01-17-2012 11:46 PM

still the same result.

NiteWave 01-18-2012 12:35 AM

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 01-18-2012 08:56 AM

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?

webizen 01-18-2012 10:17 AM

pls enable rewrite logging (add "RewriteLogLevel 9" in httpd.conf) to troubleshoot.

NiteWave 01-18-2012 06:43 PM

I see the site is ok at present.

so when enable friendly URL in wp, there is issue.
when disable, it's normal.

bangsters 02-01-2012 09:04 AM

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 02-01-2012 11:23 AM

Quote:

Originally Posted by bangsters (Post 31754)
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)


All times are GMT -7. The time now is 05:23 AM.