Reputation:
I am currently having two domains www.xyz.com and www.pqr.com. If anybody enters xyz.com I need to bringout the website pqr.com
Both are on the same server.
Kindly suggest how to go about this.
Thanks
Upvotes: 1
Views: 15208
Reputation: 609
If you are using IIS7 and you have installed URL Rewrite Module then use this article for more information : IIS URL Rewrite – Redirect multiple domain names to one
Upvotes: 0
Reputation: 3130
To redirect requests to another Web site or directory
- In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.
- Click the Home Directory, Virtual Directory, or Directory tab.
- Under The content for this source should come from, click A redirection to a URL.
- In the Redirect to box, type the URL of the destination directory or Web site.
Upvotes: 1
Reputation: 1156
If you want pqr.com to appear in the user's browser's address bar, you'll have to send a 301/302 redirect response, either through a script or through your web server's configuration - how to do this depends on what software you are using.
Upvotes: 0
Reputation: 74270
Upvotes: 4
Reputation: 41381
If you want to say that "you should always go to foo instead of bar," you want a 301 redirect (which you do with your front-end server). See http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93633
A 302 (temporary) redirect should be used in cases where you can't serve a page, but expect it to come back later. Unfortunately, it's the redirect that you get from JSP forward.
A client-side (meta refresh or javascript) redirect should be avoided whenever possible.
Apache docs for configuring a permanent (or temporary) redirect.
Upvotes: 0