[lug] url redirect through dns

Hugh Brown hugh at vecna.com
Mon Jul 2 12:13:31 MDT 2001


mod_rewrite  should be able to do what you ask without doing a redirect.

Be warned that it is not the most user friendly but it certainly is quite
powerful.

Hugh


"Judson Valeski"
> 
> AFAIK you can't do this using a DNS, but yea, you should be able to do a 
> hard re-direct by config'ing the HTTP server. If I request a url from 
> domainA, the HTTP response to that request can be a 3XX level response 
> which tells the browser to "redirect" the request to whatever URL is in 
> the "location: " header in the HTTP response. That header can point to 
> domainB for example.
> 
> I'm not sure how to specifically do this w/ apache (though I know that 
> it is possible). I would grep through apache docs for "redirect" 
> "location header" "302" etc.
> 
> Jud
> 
> charles at lunarmedia.net wrote:
> 
> >i have a client who has two domains pointing to one website. within dns,
> >they both resolve to the same ip address. the client considers one of the
> >domains to be more of a marketing ploy rather than the primary domain. he
> >would like users typing domain2.com in their browser to reach the website,
> >however to have the address rewritten in their browser as domain1.com.
> >
> >i think this can be done through the apache config, but i'm not sure how.
> >anyone know?



More information about the LUG mailing list