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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > rewrite rule problem

Reply
 
Thread Tools Display Modes
  #1  
Old 08-25-2008, 09:40 PM
joseph595 joseph595 is offline
New Member
 
Join Date: Aug 2008
Posts: 5
Default rewrite rule problem

I am using the following rules :

RewriteRule ^([0-9]+)-([a-z]+)-([0-9]+)\.html$ http://subdomain\.maindomain\.com/process\.php?id=$1&ad=$3 [R=301,L]

RewriteRule ^([0-9]+)-([a-z]+)-([0-9]+)-([0-9]+)\.html$ http://subdomain\.maindomain\.com/process\.php?id=$1&ad=$3&page=$4 [R=301,L]

RewriteRule ^([0-9]+)-([a-zA-Z0-9-]+)-([0-9]+)-url\.html$ http://subdomain\.maindomain\.com/form\.php?id=$1&keyword=$2&url=$3 [R=301,L]

RewriteRule ^([0-9]+)-([a-zA-Z0-9-]+)-([0-9]+)-custom\.html$ http://subdomain\.maindomain\.com/form\.php?id=$1&keyword=$2&custom=$3 [R=301,L]


But none of them works. What am I doing wrong here ?
Reply With Quote
  #2  
Old 08-26-2008, 07:12 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Those are rules for .htaccess, will not work at vhost level. The difference is that at .htacess level, rewrite base are striped from URL before matching the URL with the rule, it does not happen at vhost level. You may need to add a leading "/" to regex pattern when used at vhost level. like

RewriteRule ^/([0-9]+)-([a-z]+)-([0-9]+)\.html$ http://subdomain\.maindomain\.com/process\.php?id=$1&ad=$3 [R=301,L]
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:36 PM.



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