View Single Post
  #1  
Old 06-17-2005, 10:52 AM
zellster zellster is offline
Senior Member
 
Join Date: Sep 2004
Posts: 55
Default Context and perl regexps

Hello,

I have the following context set up under LSWS SE 2.0.7:

[Proxy] "/" --> Java app server

I would like to selectively redirect certain directory paths to a different server, primarily for serving static content (LiteSpeed is acting as a firewall in this scenario).

I tried the following context:

[Proxy] exp:^/(css|img|ssi)/ --> Web server

Unfortunately, that Perl expression did not seem to work in that requests to http://myserver/css/my.css and others still go to the Java app server.

I then tried:

[Proxy] exp:^/(css|img|ssi)/.* --> Web server

which didn't produce the desired result, either. I am guessing that non-regexes are matched before regexes, which would always match against "/".

Other than using three separate contexts (/css/, /img/, /ssi/) is there a better way to do the above?

Thanks.
Reply With Quote