.htaccess or Rewrite doesnt work.

DJ XtAzY

Active Member
#1
Hi! Im currently on the 15day trial of ls enterprise. Hopefully i can get this solved before it's over. I have a WHM/cPanel setup and I followed the steps how to run ls with it. Im able to connect to the site fine. Currently the server has one site and runs vb with vbseo. Since vbseo rewrite links, it seems it doesn't work when I have LS running. Apache works fine though. I checked the General Tab in the Configuration area and all the boxes except None are checked. I also browse in the Virtual Host area and enable Rewrite, but still doesnt work. Some help on this will be awesome. Thanks!
 

mistwang

LiteSpeed Staff
#2
Can you please post the VBSEO rewrite rules in the .htaccess file. I think it should work well, you can also turn on the rewrite log by adding
"RewriteLoglevel 9" to the vhost section of that virtual host. Please post the rewrite logging messages.
 

DJ XtAzY

Active Member
#3
Heres my .htaccess

Code:
# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On

# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums)
#RewriteBase /

RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{CURRENT_URI} !(admincp/|modcp/|chat|cron)
RewriteRule ^(.*\.php)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !\.(jpg|gif)$
RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteCond %{HTTP_HOST} ^mysite\.net [NC]
RewriteRule ^(.*)$ http://www.mysite.net/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^www
RewriteRule ^forums(.*)$ http://www.mysite.net/$1 [R=301,L]
I have rewrite logs from Apache only for some reason. I dont see LS making any rewrite logs however. Do you want the rewrite logs from apache?
 

mistwang

LiteSpeed Staff
#4
Have you restart LSWS after the change? the rewrite log is in the main log lsws/logs/error.log at "INFO" level, so the server log level should be set to "INFO" or "DEBUG".
 
Top