Rewrite Rules Problem

#1
Dear Support,
Hello,

I have downloaded LiteSpeed Trial to test it with vBulletin Forum. I have found that my rewrite rules are not working with LiteSpeed for some reason.

Following are the rewrite rules which are being used by our apache server.

#Show Thread Main Rules
RewriteRule ^(.*/)?(t-)([A-Za-z0-9\-]+)?-([0-9]+)/page([0-9]+)(/.*)?$ showthread.php?t=$4&page=$5&is_vrewrite=yes&%{QUERY_STRING} [L]
RewriteRule ^(.*/)?(t-)([A-Za-z0-9\-]+)?-([0-9]+)(/.*)?$ showthread.php?t=$4&is_vrewrite=yes&%{QUERY_STRING} [L]
RewriteRule ^(.*/)?(t-)([A-Za-z0-9\-]+)?-([0-9]+)-new$ showthread.php?t=$4&goto=newpost&%{QUERY_STRING} [L]
RewriteRule ^(.*/)?(t-)([A-Za-z0-9\-]+)?-([0-9]+)-last$ showthread.php?t=$4&goto=lastpost&%{QUERY_STRING} [L]
RewriteRule ^(.*/)?(t-)([A-Za-z0-9\-]+)?-([0-9]+)-post([0-9]+)(/.*)?$ showthread.php?p=$5&%{QUERY_STRING} [L]
RewriteRule ^(.*/)?(t-)([A-Za-z0-9\-]+)?-([0-9]+)-print(/.*)?$ printthread.php?t=$4&is_vrewrite=yes&%{QUERY_STRING} [L]

#Forumdisplay Rules
RewriteRule ^f-([A-Za-z0-9\-]+)?-([0-9]+)/page([0-9]+)(/.*)?$ forumdisplay.php?f=$2&&page=$3%{QUERY_STRING}&is_vrewrite=yes [L]
RewriteRule ^f-([A-Za-z0-9\-]+)?-([0-9]+)(/.*)?$ forumdisplay.php?f=$2&%{QUERY_STRING}&is_vrewrite=yes [L]

#Showpost Rules
RewriteRule ^p-([A-Za-z0-9\-]+)?-post([0-9]+)/postcount([0-9]+)$ showpost.php?p=$2&postcount=$3&is_vrewrite=yes&%{QUERY_STRING} [L]

#Memberinfo Rules
#RewriteRule ^u-([A-Za-z0-9\-]+)?-([0-9]+)$ member.php?u=$2&is_vrewrite=yes&%{QUERY_STRING} [L]
RewriteRule ^members/([A-Za-z0-9\-]+)?-([0-9]+)(/.*)?$ member.php?u=$2&is_vrewrite=yes&%{QUERY_STRING} [L]
RewriteRule ^members/([A-Za-z0-9\-]+)(/.*)?$ member.php?username=$1&is_vrewrite=yes&%{QUERY_STRING} [L]
RewriteRule ^(.*)/(member\.php)$ member.php?$1&%{QUERY_STRING} [L]

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

RewriteRule ^(.*)/(styleid=(.*))$ showthread.php?&%{QUERY_STRING} [L]
RewriteRule ^(.*)/(showthread\.php)$ showthread.php?&%{QUERY_STRING} [L]

RewriteRule ^onlineusers(/)?$ online.php?is_vrewrite=yes&%{QUERY_STRING} [L]
RewriteRule ^showgroups(/)?$ showgroups.php?is_vrewrite=yes&%{QUERY_STRING} [L]
RewriteRule ^memberslist(/)?$ memberlist.php?is_vrewrite=yes&%{QUERY_STRING} [L]
RewriteRule ^members(/)?$ memberlist.php?is_vrewrite=yes&%{QUERY_STRING} [L]
RewriteRule ^boardrules(/)?$ faq.php?faq=boardrules&&is_vrewrite=yes&%{QUERY_STRING} [L]
RewriteRule ^disclaimer(/)?$ faq.php?faq=fstdisclaimer&&is_vrewrite=yes&%{QUERY_STRING} [L]

RewriteRule ^search-([A-Za-z0-9\-]+)/$ search.php?do=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/(.*)(\.php)$ $2.php?&%{QUERY_STRING} [L]

RewriteRule ^verifieds/emule.gif$ images/smilies/emule.gif
RewriteRule ^verifieds/ft.gif$ images/smilies/ft.gif

Best Regards.
 

mistwang

LiteSpeed Staff
#2
You should enable rewrite log with "RewriteLogLevel 9" in the vhost configuration section for that website. then check /opt/lsws/logs/error.log or error_log under /usr/local/apache/logs/
 

mistwang

LiteSpeed Staff
#8
You are using rewrite rules for .htaccess at vhost level, it will not work. You have to use .htacces or create a static context "/" and move rewrite rule there.
rewrite rule at vhost level does not have a rewrite base to remove from URL.
 
Top