LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-17-2006, 11:51 AM   #1
ice99
Member
 
Registered: Aug 2005
Posts: 51

Rep: Reputation: 15
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.
 
Old 07-17-2006, 12:01 PM   #2
jayemef
Member
 
Registered: Aug 2005
Location: Juniata College, PA
Distribution: Ubuntu, Slackware
Posts: 67

Rep: Reputation: 15
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
 
Old 07-17-2006, 12:20 PM   #3
ice99
Member
 
Registered: Aug 2005
Posts: 51

Original Poster
Rep: Reputation: 15
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
 
Old 07-17-2006, 12:24 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache - Website Redirection Help cbarone2005 Linux - Software 2 09-29-2005 02:45 PM
Redirection in Apache gonzo22 Linux - Networking 5 02-12-2005 09:54 AM
Apache redirection question... WeNdeL Linux - Software 2 04-01-2004 10:48 AM
Apache - Redirection problem... elitecodex Linux - Software 5 03-29-2004 10:12 PM
apache redirection failing acid_kewpie Linux - Networking 2 08-15-2002 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration