On Fri, Jan 19, 2001 at 10:52:22PM -0600, Les Mikesell wrote:
> 
> ----- Original Message ----- 
> From: "Tomas Edwardsson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 19, 2001 4:56 AM
> Subject: Using rewrite...
> 
> 
> > Hi
> > 
> > I'm using rewrite to send a request to a relevant server, for
> > instance if a filename ends with .pl I rewrite it to the perl
> > enabled apache:
> > 
> > RewriteEngine On
> > 
> > # Perl Enabled.
> > RewriteRule ^/(.*\.ehtm)$ http://%{HTTP_HOST}:81/$1 [P]
> > RewriteRule ^/(.*\.pl)$ http://%{HTTP_HOST}:81/$1 [P]
> > # PHP Enabled
> > RewriteRule ^(.*\.php)$ http://%{HTTP_HOST}:83$1 [P]
> > # Everyting else, images etc...
> > RewriteRule ^/(.*)$ http://%{HTTP_HOST}:82/$1 [P]
> > 
> > The problem is that I can't find a way to send the request
> > to a relevant port if the request calls for a URL which ends
> > with a slash ("/"). Any hints ?
> 

I have to problem with matching the slash. The problem is if you ask
for http://www.domain.com/ the proxy daemon has no idea if the client
is asking for a perl, php or static document. Therefore I need a method
to extract the filename which is relevant from DirectoryIndex.

> Won't it work if you make the regexp match the slash too?  Something
> like:
> RewriteRule ^/(.*\.pl/*)$ http://%{HTTP_HOST}:81/$1 [P]
>   or just duplicate the line with and without the slash in the pattern.
> 
> 
>     Les Mikesell
>        [EMAIL PROTECTED]
>  

Reply via email to