Solved

IIS 301 Redirect @ Server Level not Page Level

Posted on 2006-06-14
5
370 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

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…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now