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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > RewriteRule & Contexte

Reply
 
Thread Tools Display Modes
  #1  
Old 03-17-2005, 01:26 AM
xobul xobul is offline
New Member
 
Join Date: Mar 2005
Posts: 2
Default RewriteRule & Contexte

Hi,

I wan't to import my rewrite apache config :

RewriteRule ^/([a-g]+)(.+)$ /nodes/node0004/www/kokoom.com/$1$2 [L]
RewriteRule ^/([h-p]+)(.+)$ /nodes/node0006/www/kokoom.com/$1$2 [L]
RewriteRule ^/(.+)$ /nodes/node0001/www/kokoom.com/$1

but this don't work with Litespeed. I have make a test with static context and
exp:^/([a-g]+)(.+)$ for the URI but i can't put $1 in location...

where the solution ?

Xobul
Reply With Quote
  #2  
Old 03-17-2005, 08:17 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Those rewrite rules should work, make sure you turned on the rewrite engine under the "rewrite" tab. If you already did, please turn on the rewrite log and check the lsws/logs/error.log

As to the context, if you upgrade to the official 2.0 release, there should be no problem to use $x in location.

Best Regards,
George
Reply With Quote
  #3  
Old 03-17-2005, 09:20 AM
xobul xobul is offline
New Member
 
Join Date: Mar 2005
Posts: 2
Default Rewrite

[REWRITE] Source URI: '/index.html' => Result URI: '/nodes/node0006/www/kokoom.com/index.html'

in apache this rewrite rule rewrite to filesystem . "/nodes/node0006/www/kokoom.com/index.html" in my apache config is not an URI but full path.

Best Regards,

Note: All my tests is on lsws 2-pro
Reply With Quote
  #4  
Old 03-17-2005, 09:39 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
LSWS will determine whether the rewritten URI is a file path or a url at later stage, but the target path must be somewhere under the document root of that virtual host.
LSWS does not allow you to rewrite to an arbitrary location for security reason. You probably need to set document root to /nodes/ in your case.

Please let me know if it fixes your problem. :-)
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rewrite. Again :) [/root.] Install/Configuration 1 04-22-2007 11:46 AM
Problem with RewriteCond order and %n in RewriteRule gboudreau Install/Configuration 3 10-02-2006 01:52 PM
Mod-Rewrite Channel_Cat Install/Configuration 3 09-21-2004 01:57 PM


All times are GMT -7. The time now is 03:54 PM.



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