RewriteCond %{HTTP_HOST} ^${MyMap:%{HTTP_HOST}}$RewriteRule ^(.{MyMap:%{HTTP_HOST}})$ <something here that is the value ofthe 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 thefly 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.
Morning. Unfortunately, no luck :( The config as it stands now: RewriteEngine On RewriteLog <log file> RewriteLogLevel 9 RewriteMap MyMap txt:<file> RewriteConf ${MyMap:%{HTTP_HOST}|not-found} !=not-found RewriteRule (.*)$ http://${MyMap:%{HTTP_HOST}}$1 [P] My map, contains: my.domain.com internal.my.domain.comGoing to my.domain.com, the request ends up on my default v-host, which is configured after the Rewrite section. My RewriteLog, shows nudda... Blank. I've added the [P] as Apache MUST proxy these requests... The internal.my.domain.com is not accessable for any machines on the Internet, only the apache servers doing the rewriting, hence, it must proxy, and not show the browser the internal URLs etc.
Doing the above on a 'per vhost' config works very well (we have that running already), but we now obviously wants to move to a map in order to not having to restart / reconfigure new vhosts all the time in Apache....
-- 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