Hello
I need to configure Apache to handle around 1000 redirects in around
30 virtual hosts, with one of them handling the vast majority of
around 700. I wanted to use mod_alias Redirect statements, but
unfortunately I can't: I receive the requests through a reverse proxy
that cannot preserve the browsers "Host:" header unmodified, instead I
receive it in another HTTP header, HTTP_DOMAIN (yes, I know, a strange
reverse proxy but there is no choice). I switched to using mod_rewrite
which has no problems extracting the information from the HTTP_DOMAIN
header. I end up with lots of statements like
RewriteCond %{HTTP:HTTP_DOMAIN} ^my\.domain\.com$
RewriteRule ^/f/e/u/config.html(/|$)
http://my.domain.com/some/other/url [redirect,noescape,last]
RewriteCond %{HTTP:HTTP_DOMAIN} ^my\.domain\.com$
RewriteRule ^/e/e/u/konfig.html(/|$)
http://my.domain.com/some/other/url [redirect,noescape,last]
There must be ways to do this in a more effective way. Is there a
possibility to set the "Host:" header with mod_rewrite and then let
the
request be handled by the Redirect statements in name based
VirtualHost sections?
Thanks
/Francois