Custom redirect page works for .aspx pages but not .html pages
Custom redirect page works for .aspx pages but not .html pages
am 02.04.2008 16:31:00 von BrianB
Our website uses .NET 2.0 on a windows 2003 server. We changed the custom
404 error pages to "URL" and set them to /sorry.aspx. Edited the web.config
file appropriatly.
All works well when a .aspx page is not foud, the custom 404 page is
displayed.
When a .html or htm page is not found the custom 404 page is NOT displayed.
How can this be corrected?
Thanks,
Brian
Re: Custom redirect page works for .aspx pages but not .html pages
am 02.04.2008 17:05:20 von Ken Schaefer
For file types not handled by ASP.NET, the custom error page is not set in
web.config. It is set in the IIS metabase instead. You can change the custom
error using IIS Manager.
Cheers
Ken
--
My IIS blog: http://adopenstatic.com/blog
"BrianB" wrote in message
news:F2F06204-1A0A-42FF-A8A9-7E461F5CCE80@microsoft.com...
> Our website uses .NET 2.0 on a windows 2003 server. We changed the custom
> 404 error pages to "URL" and set them to /sorry.aspx. Edited the
> web.config
> file appropriatly.
>
> All works well when a .aspx page is not foud, the custom 404 page is
> displayed.
>
> When a .html or htm page is not found the custom 404 page is NOT
> displayed.
>
> How can this be corrected?
>
> Thanks,
> Brian
Re: Custom redirect page works for .aspx pages but not .html pages
am 02.04.2008 17:16:07 von BrianB
On the "Custom Errors" tab? This was done, but to no avail.
Thanks,
brian
"Ken Schaefer" wrote:
> For file types not handled by ASP.NET, the custom error page is not set in
> web.config. It is set in the IIS metabase instead. You can change the custom
> error using IIS Manager.
>
> Cheers
> Ken
> --
> My IIS blog: http://adopenstatic.com/blog
>
> "BrianB" wrote in message
> news:F2F06204-1A0A-42FF-A8A9-7E461F5CCE80@microsoft.com...
> > Our website uses .NET 2.0 on a windows 2003 server. We changed the custom
> > 404 error pages to "URL" and set them to /sorry.aspx. Edited the
> > web.config
> > file appropriatly.
> >
> > All works well when a .aspx page is not foud, the custom 404 page is
> > displayed.
> >
> > When a .html or htm page is not found the custom 404 page is NOT
> > displayed.
> >
> > How can this be corrected?
> >
> > Thanks,
> > Brian
>
>
Re: Custom redirect page works for .aspx pages but not .html pages
am 02.04.2008 22:01:31 von Ken Schaefer
Hi,
Yes - editing the 404 on Custom Errors should be all that you need to do
(set it to type=URL and /sorry.aspx)
What is being displayed to users instead of your custom error page?
Cheers
Ken
--
My IIS blog: http://adopenstatic.com/blog
"BrianB" wrote in message
news:046C4FCF-DB95-4B13-92AF-9AA432636BD9@microsoft.com...
> On the "Custom Errors" tab? This was done, but to no avail.
>
> Thanks,
> brian
>
> "Ken Schaefer" wrote:
>
>> For file types not handled by ASP.NET, the custom error page is not set
>> in
>> web.config. It is set in the IIS metabase instead. You can change the
>> custom
>> error using IIS Manager.
>>
>> Cheers
>> Ken
>> --
>> My IIS blog: http://adopenstatic.com/blog
>>
>> "BrianB" wrote in message
>> news:F2F06204-1A0A-42FF-A8A9-7E461F5CCE80@microsoft.com...
>> > Our website uses .NET 2.0 on a windows 2003 server. We changed the
>> > custom
>> > 404 error pages to "URL" and set them to /sorry.aspx. Edited the
>> > web.config
>> > file appropriatly.
>> >
>> > All works well when a .aspx page is not foud, the custom 404 page is
>> > displayed.
>> >
>> > When a .html or htm page is not found the custom 404 page is NOT
>> > displayed.
>> >
>> > How can this be corrected?
>> >
>> > Thanks,
>> > Brian
>>
>>
Re: Custom redirect page works for .aspx pages but not .html pages
am 02.04.2008 22:12:02 von BrianB
Hey Ken,
When I go to a page that I know is NOT on the website such as:
http://www.server.com/anything.html
I get the following:
-------
Not Found
The requested URL /anything.html was not found on this server.
-------
Custom errors for "404" is set to "url" and "/sorry.aspx".
http:/www.server.com/anything.aspx, it works. Gotta be something simple?
"Ken Schaefer" wrote:
> Hi,
>
> Yes - editing the 404 on Custom Errors should be all that you need to do
> (set it to type=URL and /sorry.aspx)
>
> What is being displayed to users instead of your custom error page?
>
> Cheers
> Ken
>
> --
> My IIS blog: http://adopenstatic.com/blog
>
> "BrianB" wrote in message
> news:046C4FCF-DB95-4B13-92AF-9AA432636BD9@microsoft.com...
> > On the "Custom Errors" tab? This was done, but to no avail.
> >
> > Thanks,
> > brian
> >
> > "Ken Schaefer" wrote:
> >
> >> For file types not handled by ASP.NET, the custom error page is not set
> >> in
> >> web.config. It is set in the IIS metabase instead. You can change the
> >> custom
> >> error using IIS Manager.
> >>
> >> Cheers
> >> Ken
> >> --
> >> My IIS blog: http://adopenstatic.com/blog
> >>
> >> "BrianB" wrote in message
> >> news:F2F06204-1A0A-42FF-A8A9-7E461F5CCE80@microsoft.com...
> >> > Our website uses .NET 2.0 on a windows 2003 server. We changed the
> >> > custom
> >> > 404 error pages to "URL" and set them to /sorry.aspx. Edited the
> >> > web.config
> >> > file appropriatly.
> >> >
> >> > All works well when a .aspx page is not foud, the custom 404 page is
> >> > displayed.
> >> >
> >> > When a .html or htm page is not found the custom 404 page is NOT
> >> > displayed.
> >> >
> >> > How can this be corrected?
> >> >
> >> > Thanks,
> >> > Brian
> >>
> >>
>
>