bluenile
bluenile

Reputation:

Redirecting a domain using IIS

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

Answers (5)

MRP
MRP

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

ylebre
ylebre

Reputation: 3130

From http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/6b855a7a-0884-4508-ba95-079f38c77017.mspx?mfr=true

To redirect requests to another Web site or directory

  1. In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.
  2. Click the Home Directory, Virtual Directory, or Directory tab.
  3. Under The content for this source should come from, click A redirection to a URL.
  4. In the Redirect to box, type the URL of the destination directory or Web site.

Upvotes: 1

knabar
knabar

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

Otávio Décio
Otávio Décio

Reputation: 74270

  • In internet services manager, right click on the file or folder you wish to redirect then select "Properties"
  • Select the radio titled "a redirection to a URL".
  • Enter the redirection page
  • Check "The exact url entered above" and the "A permanent redirection for this resource"
  • Click on 'Apply'

Upvotes: 4

cgp
cgp

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

Related Questions