Permanent redirect on multiple pages in iis from subfolder in one domain to another domain?

We are moving our departmental web site from www.firstdomain.com/subdirectory/ to www.seconddomain.com. The domains reside on separate servers.

The IT staff have said they plan to simply forward everyone who comes to the existing web site (regardless of which specific page they were accessing) to the front page of the new site. In my mind this is unacceptable, as we need people to be transparently directed to the corresponding web page on the new site. I also believe that a universal redirect to the front page of the new site would royally gack up search engine rankings.

Is there a way to globally map this, or must it be done as individual 301 redirects?

Examples:

www.firstdomain.com/subdirectory/news.html -> www.seconddomain.com/news.html
www.firstdomain.com/subdirectory/aboutus.html -> www.seconddomain.com/aboutus.html

The file names should not have changed, just their locations. In the event the corresponding file does not exist on the new server, I would want to display a customized 404 page.
taxschoolAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kenfcampCommented:
That should be simple enough.

Delete (or comment out) the root (directory) path for firstdomain.com in your httpd's (apache, etc) config file and add

Redirect 301 / http://www.seconddomain.com/

This will send a request for: http://www.firstdomain.com/somepage.html
to http://www.seconddoman.com/sompage.html

However, if the page names or directories don't match or exist, visitors will hit an error page

Ken
0
taxschoolAuthor Commented:
Just to reiterate some original details: this is IIS... Windows Server 2003... not a unix variant. I don't believe there is an httpd.conf or similar file.
0
kenfcampCommented:
Egh, sorry about that (I missed it) :\

At any rate, that's no problem

1) Login as administrator

2) Click: Start / Setting / Control panel / Administrative Tools / Internet Information Services (IIS) Manager

3) Click the cross that is next to the computer to drop down the list of the configured folders within IIS.

4) Click the cross next to the "Web Sites" folder

5) Right click on the domain that you wish to setup the 301 redirect on and select properties

6) in the new window click on the tab labeled home directory

WARNING:
Once you are in the home directory pay close attention, you do not want to mess with any other settings this could result in your website not being displayed.

7) Select the option marked "A redirection to a URL"

8) In the redirect to box: Enter the website address that you want the site to direct to

9) Check the "A permanent redirection for this resource" box
by checking this button you are telling the server that you want the redirection to be permanent.

Once this has been done click ok then close IIS and test the domain to see if it forwards. If this forwards to the new domain then you have correctly implemented your first 301.

Don't know why MS needs so many steps ;)

Hope this helps

Ken
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.