# customizing 404 error page



## gib88 (Aug 18, 2005)

I'm trying to setup a custom 404 error page on my website, and I'm following this IIS 6.0 guide:

http://www.microsoft.com/technet/pr...d8d-8fd8-4af5-bb3b-4d11fff3ab9c.mspx?mfr=true

It tells me I can open the properties of my website, click on the custom errors tab, select the error I wish to customize (in this case, 404), and click edit.

From there, I'd like to set it to a URL. I would like to chose my home page so that when someone searches for, say, http://www.mm-theory.com/nofilehere, it redirects to http://www.mm-theory.com. The problem is that when I enter the full URL (http://www.mm-theory.com) it tells me:

"Wrong URL format. Please enter an absolute URL within the site."

It does this for any page within my site. I can't see how the URL I'm entering is not absolute, and all URLs I enter are indeed in my site.

Any idea what I'm doing wrong?


----------



## TechGuy (Feb 12, 1999)

Maybe it's as simple as adding a trailing / so that it's a full URL (http://www.mm-theory.com/) -- or maybe specify the index (http://www.mm-theory.com/home.htm). Otherwise, I'd suspect that some setting indicating the domain name might not be set right and IIS is thinking that actually mm-theory.com isn't within your site.


----------



## gib88 (Aug 18, 2005)

Yes, I tried both those. Neither worked. Thanks anyway.

Any suggestions on how to check the domain name settings?


----------



## aasimenator (Dec 21, 2008)

have you created an alias record for www in the DNS Server for the site you want to redirect to.


----------



## gib88 (Aug 18, 2005)

Not sure what that means. I know very little about DNS machines (except what they do in general). I run my own server, but the DNS is managed by register.com. Maybe I'll contact them.

I'm not sure what I'd say to them though - should I tell them I want to create an alias record for the www? What should the record be set to?


----------



## aasimenator (Dec 21, 2008)

*To redirect requests to another Web site or directory*

1.
In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click *Properties*.
2.
Click the *Home Directory*, *Virtual Directory*, or *Directory* tab.
3.
Under *The content for this source should come from*, click *A redirection to a URL*.
4.
In the *Redirect to* box, type the URL of the destination directory or Web site. For example, to redirect all requests for files in the Catalog directory to the NewCatalog directory, type */NewCatalog*.
*To redirect all requests to a single file*

1.
In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click *Properties*.
2.
Click the *Home Directory*, *Virtual Directory*, or *Directory* tab.
3.
Under *The content for this source should come from*, click *A redirection to a URL*.
4.
In the *Redirect to* box, type the URL of the destination file.
5.
Select the *The exact URL entered above* check box to prevent the Web server from appending the original file name to the destination URL.
You can use wildcards and redirect variables in the destination URL to precisely control how the original URL is translated into the destination URL.
You can also use the redirect method to redirect all requests for files in a particular directory to a program. Generally, you should pass any parameters from the original URL to the program, which you can do by using redirect variables.


----------



## Dsimms (Mar 17, 2009)

http://serverintellect.com/support/helm3/helm3-custom-error-pages.aspx This is pretty much what I have found.


----------

