Solved

IIS 301 Redirect @ Server Level not Page Level

Posted on 2006-06-14
5
373 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

749 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