Find the answer to your Linux question:
Results 1 to 4 of 4
I heed help. How can I setup a redirection directive in apache (httpd)? I have a domain www.domain1.com and www.domain2.com . So what I need to do is to redirect ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    26

    redirection in apache


    I heed help. How can I setup a redirection directive in apache (httpd)? I have a domain www.domain1.com and www.domain2.com. So what I need to do is to redirect the visitors for www.domain1.com to www.domain2.com. For example when a visitor enter www.domain1.com in a web browser I want to be automaticly redirected to a www.domain2.com. Also I will need to change the name , so when he enter www.domain1.com to be redirected to www.domain2.com but the name in the adressbar to be also changed from www.domain1.com to www.domain2.com.

  2. #2
    Linux User
    Join Date
    Jan 2006
    Posts
    251

  3. #3
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,914
    Or you can add a meta tag to the top of the index.html file, something like this:

    Code:
    <meta http-equiv="Refresh" content="0; url=http://www.domain2.com">
    that would give you in-site control over each redirection, and allows you to point different bits of a site to different other sites. I use this technique to forward my http webmail page to my https webmail page.
    Linux user #126863 - see http://linuxcounter.net/

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    I'm closing this thread because for some strange reason it has become a magnet for spammers. My apologies to the original poster if your problem was not solved.
    Registered Linux user #270181
    TechieMoe's Tech Rants

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •