On 8/15/05, Chris Knipe <[EMAIL PROTECTED]> wrote:
> RewriteEngine On
> RewriteMap MyMap txt:the.file
> 
> RewriteCond %{HTTP_HOST} ^${MyMap:%{HTTP_HOST}}$
> RewriteRule ^(.{MyMap:%{HTTP_HOST}})$  <something here that is the value of
> the key>$1 [P]
> 
> Basically, anything to host 1, proxy to host 2..... The main reason wanting
> to use a external map, is so that we can add/remove/modify mappings on the
> fly without having to restart apache....

Try something like
RewriteCond ${MyMap:%{HTTP_HOST}|not-found} !=not-found
RewriteRule (.*) http://${MyMap:%{HTTP_HOST}}$1

And be sure to use the RewriteLog to help you debug.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to