RewriteRule & Contexte
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 ?
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.
[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.
Note: All my tests is on lsws 2-pro
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. :-)
|All times are GMT -7. The time now is 07:22 AM.|