homepage Welcome to WebmasterWorld Guest from 54.237.71.86
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
IIS 404 redirecting using a textfile
ryan_b83




msg:3892095
 3:03 pm on Apr 14, 2009 (gmt 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

 

Ocean10000




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

IIS has no such file. You will have to do this via the Administrative tools for managing IIS.

marcel




msg:3893652
 12:15 pm on Apr 16, 2009 (gmt 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

marcel




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved