LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   redirection in apache (https://www.linuxquestions.org/questions/linux-networking-3/redirection-in-apache-464895/)

ice99 07-17-2006 11:51 AM

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.

Thanks in advance.

jayemef 07-17-2006 12:01 PM

The easiest thing to do is to just use JavaScript to redirect. The following link covers this technique pretty well: http://www.tizag.com/javascriptT/javascriptredirect.php

ice99 07-17-2006 12:20 PM

Thanks, but I will need to do this in my httpd.conf file.

Thanks again


Quote:

Originally Posted by jayemef
The easiest thing to do is to just use JavaScript to redirect. The following link covers this technique pretty well: http://www.tizag.com/javascriptT/javascriptredirect.php


david_ross 07-17-2006 12:24 PM

You can use the url rewriting techniques documented here:
http://httpd.apache.org/docs/2.2/misc/rewriteguide.html


All times are GMT -5. The time now is 07:11 PM.