?
Solved

IIS 301 Redirect @ Server Level not Page Level

Posted on 2006-06-14
5
Medium Priority
?
375 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 375 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

771 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