Solved

IIS 301 Redirect @ Server Level not Page Level

Posted on 2006-06-14
5
372 Views
Last Modified: 2008-02-01
Good Day,

Happy World Cupping to all!  I finally feel warm and fuzzy inside again...

Question:

I recently overhauled an old site and I am looking to redirect the old indexed pages over to the new ones.  With Apache I simply add a few lines of code to the .htaccess file, badda-bing, and I'm done.

Now with IIS, I am learning that you have to have the file on the server (ugh) and right click -> properties -> permenantly redirect to: -> yadda yadda.  

I can easily say I have a good 30-40 pages I need to redirect.  I don't want to have to upload these blank .html files to the server just to do so.  Can I not control this at the server level from one file - such as an .htaccess?

Site is using PHP at its core.

Thanks,
0
Comment
Question by:pmagony
  • 3
  • 2
5 Comments
 
LVL 37

Expert Comment

by:meverest
ID: 16911334
right click the web site in IIS manager (start->run->"inetmgr"->OK) select properties, select home directory tab, choose 'redirect to another url', enter the the new server address, check 'a permanent redirection' and OK to everything.

Cheers.
0
 
LVL 9

Author Comment

by:pmagony
ID: 16911564
Hi Meverest,

Thanks for the response.  I need a little clarification, however.  Not so much with the steps and location of how to execute this but more over on the end result.

If I look up pages indexed on google for my site, i see a lot of the older pages being listed.  If someone clicks that link, they are going to obviously be taken to a page that does not exist.  But according to your solution, if I redirect the home directory, won't that effect all pages indexed for the site? And not just the ones that are old?

Thanks-
0
 
LVL 37

Accepted Solution

by:
meverest earned 125 total points
ID: 16911819
that is correct.

you can add stuff to the metabase.xml file to do it by hand on individual files:

<IIsWebFile      Location ="/LM/W3SVC/xxxxxx/ROOT/path/path/oldfile.html"
      >
      <Custom
            Name="HttpRedirect"
            ID="6011"
            Value="http://www.mydomain.com/path/path/newfile.html, EXACT_DESTINATION"
            Type="STRING"
            UserType="IIS_MD_UT_FILE"
            Attributes="NO_ATTRIBUTES"
      />
</IIsWebFile>

replace 'xxxxxx' with the websiteID (look at the 'identifier' column in the list of web sites) and the path to the file after /ROOT/

paste one of those in there for each redirect, and save it off.  all done.

Cheers.
0
 
LVL 9

Author Comment

by:pmagony
ID: 16913624
Thank you-
0
 
LVL 37

Expert Comment

by:meverest
ID: 16916252
you are welcome... so why the 'B'?

Cheers.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question