[lug] url redirect through dns

Tkil tkil at scrye.com
Mon Jun 11 14:18:51 MDT 2001


>>>>> "charles" == charles  <charles at lunarmedia.net> writes:

charles> i have a client who has two domains pointing to one
charles> website. within dns, they both resolve to the same ip
charles> address. the client considers one of the domains to be more
charles> of a marketing ploy rather than the primary domain. he would
charles> like users typing domain2.com in their browser to reach the
charles> website, however to have the address rewritten in their
charles> browser as domain1.com.

charles> i think this can be done through the apache config, but i'm
charles> not sure how.  anyone know?

as someone else already pointed out, you'll need to use named virtual
hosts for this.  the second half of the solution is to send a redirect
back to the client.  there should be some good writeups on using the
virtual hosts:

   http://httpd.apache.org/docs/vhosts/index.html

and, it seems that mod_alias might be sufficient to the task of
redirection:

   http://httpd.apache.org/docs/mod/mod_alias.html#redirect

t.



More information about the LUG mailing list