Web Servers on Unix and Linux - many redirects / unavailable Host: header

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > May 2004 > many redirects / unavailable Host: header





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author many redirects / unavailable Host: header
Wurzel Sepp

2004-05-22, 10:34 pm

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
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com