Welcome to WebmasterWorld Guest from 35.171.146.16

Forum Moderators: ocean10000

Message Too Old, No Replies

IIS 404 redirecting using a textfile

     
3:03 pm on Apr 14, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:July 28, 2006
posts: 168
votes: 0


Pardon my ignorance, I almost never use IIS. Basically is there an IIS equivalent to the Apache .htaccess file? I want to redirect all traffic within a folder to another URL (even when it hit's 404's). All i have found as solutions for this is done through the IIS GUI config, and I do not have access to that.

Thanks,
Ryan

4:21 pm on Apr 15, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

joined:Jan 14, 2004
posts:864
votes: 3


IIS has no such file. You will have to do this via the Administrative tools for managing IIS.
12:15 pm on Apr 16, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 1, 2005
posts:733
votes: 0


If your host is running IIS 7 and has the 'Microsoft URL Rewrite Module for IIS 7.0' installed you can define redirects in your web.config file.

eg:

[2]
<system.webServer>
<rewrite>
<rules>
<rule name="Home.htm" patternSyntax="Wildcard" stopProcessing="true">
<match url="*/mydirectory/*" />
<action type="Redirect" url="http://www.website.com/newpage.aspx" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
[/2]

* Edit: the rewrite rule above has not been tested, so it may contain errors

12:54 pm on Apr 16, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 1, 2005
posts:733
votes: 0


Here is some more info on the subject:
[blogs.iis.net...]
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members