Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 179
  • Last Modified:

Bind Configuration

Hello,
I am using Bind 9.0 with RHEL 3.0. I am having a web server running apache and the DNS server is having two zones defined so that www.1.com and www.2.com points to the same location (my web server). I want to configure things in a way so that when one types www.2.com in the URL box in the web browser, not only the proper page is served (which is happening now) but the URL box also shows the address as www.1.com/name_of_the_page instead of the present scenario where we see www.2.com/name_of_the_page. How this can be achieved? I think something similar can be achieved with mod_rewrite module in Apache. But that looks too difficult to me. Any help please.
With regards,
Goutam
0
goutambaul
Asked:
goutambaul
2 Solutions
 
harbor235Commented:
You can have two url's resolve to the same address with seperate A records, thats not a problem.

>I want to configure things in a way so that when one types www.2.com in the URL box in the web browser, not only the proper page is served (which is happening now) but the URL box also shows the address as www.1.com/name_of_the_page instead of the present scenario where we see www.2.com/name_of_the_page.

But now you are asking to treat your two seperate domains as one domain essentially. If you are going to do this
why bother with multiple domains? Just configure one domain.



harbor235
0
 
Gabriel OrozcoSolution ArchitectCommented:
I would have a redirect page on the second domain. that way, user will have the correct URL all the time.

redirect code is as follow (create the index page for www.2.com as this:)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//US">
<html>
 <head>
  <META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www.1.com/">
 </head>
</html>

Then you will have correct behavior.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now