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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > Rewrite Rules Problem

Reply
 
Thread Tools Display Modes
  #1  
Old 06-26-2008, 10:39 PM
LinuxFreak LinuxFreak is offline
Member
 
Join Date: Sep 2007
Posts: 12
Default Rewrite Rules Problem

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&%{QUER Y_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_STRIN G} [L]

#Forumdisplay Rules
RewriteRule ^f-([A-Za-z0-9\-]+)?-([0-9]+)/page([0-9]+)(/.*)?$ forumdisplay.php?f=$2&&page=$3%{QUERY_STRING}&is_v rewrite=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&%{Q UERY_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_STR ING} [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_ST RING} [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.
__________________
Farrukh Ahmed
Reply With Quote
  #2  
Old 06-27-2008, 11:06 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
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/
Reply With Quote
  #3  
Old 06-27-2008, 11:12 AM
LinuxFreak LinuxFreak is offline
Member
 
Join Date: Sep 2007
Posts: 12
Default Re:

Dear mistwang,

I have done this already but i did not get much information.

Best Regards.
__________________
Farrukh Ahmed
Reply With Quote
  #4  
Old 06-27-2008, 11:39 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Post the URL have problem with and the corresponding error log section containing rewrite log.
Reply With Quote
  #5  
Old 06-27-2008, 11:42 AM
LinuxFreak LinuxFreak is offline
Member
 
Join Date: Sep 2007
Posts: 12
Default Re:

Dear mistwang,

I will do that can you tell me is there any way to keep rewrite logs separate ?

Best Regards.
__________________
Farrukh Ahmed
Reply With Quote
  #6  
Old 06-27-2008, 12:44 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
It is not possible, but you can grep your IP to extract related the log entries.
Reply With Quote
  #7  
Old 06-27-2008, 08:28 PM
LinuxFreak LinuxFreak is offline
Member
 
Join Date: Sep 2007
Posts: 12
Default Re:

Dear mistwang,

Following is the log output.

FYI, http://rafb.net/p/Hd8NuS78.html

Best Regards.
__________________
Farrukh Ahmed
Reply With Quote
  #8  
Old 06-27-2008, 09:01 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
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.
Reply With Quote
  #9  
Old 06-27-2008, 10:43 PM
LinuxFreak LinuxFreak is offline
Member
 
Join Date: Sep 2007
Posts: 12
Default Re:

Dear mistwang,

I have also used rewrite rules in .htaccess but they are not working

Best Regards.
__________________
Farrukh Ahmed
Reply With Quote
  #10  
Old 06-28-2008, 04:18 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Post the rewrite log then.
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 12:48 AM.



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