On 8/15/05, Chris Knipe <savage@xxxxxxxxxxxxx> wrote:
Afternoon, the.file: my.web.site my.internal.web.site apache conf: RewriteEngine On RewriteMap MyMap txt:the.file Now, what I'm not sure about.... If I add xyz.com and internal.xyz.com to the.file, I want apache todynamically detect that xyz.com is in the file, and PROXY [P] the request tothe key's value. I'm well aware of how to do this statically, but I'm unfortunately not sure on how to do this dynamically with the RewriteMap?Can you show us your best guess and describe what happens when you try to use it?
Hi Joshua,Uhm, I did have a look at this prior to posting, I'm semi sure about the condition, but not sure at all about the actual rewrite.... I have the following in my little scratch pad:
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....
-- Chris. -- Chris. --------------------------------------------------------------------- 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: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx