Solved

IIS 301 redirects with a non-existing file

Posted on 2006-06-19
3
324 Views
Last Modified: 2008-01-09
It seems that its possible to do a 301 redirect in apache even if the file no longer exists.  Is this possible to do this in IIS?  I currently have blank html files that are redirecting to valid URLs and I want to get rid of the blank pages completely.

Thanks,
-Nathan
0
Comment
Question by:neight108
[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
  • 2
3 Comments
 
LVL 37

Accepted Solution

by:
meverest earned 100 total points
ID: 16941175
If you want to use the GUI to add the redirectl then you will need some file in there to give you something to right click on.  Once the redirect is created, you should be able to delete the physical file.

else, add the 301 directly to the metabase.xml:

<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
 

Author Comment

by:neight108
ID: 16943185
thanks, I will give this a try.
0
 

Author Comment

by:neight108
ID: 16953402
it worked great, thanks
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Today I came across an interesting issue that had me pulling my hair out.  I was troubleshooting a new internal web site which uses integrated security instead of anonymous.  When browsing the site from my laptop, I was able to access it with no iss…
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 an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

751 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