Welcome to WebmasterWorld Guest from 54.196.223.42

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

IIS Equivalent of .htaccess

How do you redirect all missing pages using IIS?

     
11:16 pm on Sep 27, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 4, 2003
posts:438
votes: 0


Hi Guys ...

Typing these lines into .htaccess is a pretty easy way redirect all 400 and 500 errors to a set page on a Linux server ...

errordocument 404 [domain.com...]
errordocument 500 [domain.com...]

Anyone know if there is a quick and easy way of achieving the same thing on a Windows server running IIS?

11:27 pm on Sept 27, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0


Yes. In your IIS manager bring up the properties for the website. There is a tab called "custom errors".

This tab lists all the error codes with the default web pages associated with them. You would create your own web page and point the error to that page.

I called mine "404.htm" and pointed all 404 errors to that page.

You can it for every error, or just selected ones if you want.

11:39 pm on Sept 27, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 4, 2003
posts:438
votes: 0


Thanks txbakers.

One small issue ... I don't have access to a control panel for this one particular site at the moment.

Is there any way of doing this with a single file the way you would with .htaccess on a Linux box?

Guess I'll just drop a couple of pages in to plug holes for the time being if not :(

2:57 am on Sept 28, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0


i don't think so.
10:18 pm on Sept 28, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 4, 2003
posts:438
votes: 0


OK txb ... thanks for your input