----- 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 ?
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]