Not a member yet?

Not a member yet? Register now!

*
*
*

*
Already a member?
Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > FileNotFound Redirection View modes: 
User avatar
Member
Member
francis.harvey-irisco - 10/4/2010 10:56:55 AM
     
FileNotFound Redirection
I create a page for FileNotFound redirection but it work only when i'm in debug / localhost mode

if i write http://localhost:8096/khafdshkdsajhadsjh, that work !!
but if i write http://MyMachine:8095/khdahdkjhska that doesn't work

why ??????

Maybe the problem is linked to the port or domain alias...?

Thanks

User avatar
Member
Member
francis.harvey-irisco - 10/6/2010 1:29:06 PM
     
RE:FileNotFound Redirection
Sorry it is Page not found URL redirection, my mistake...

but nobody use the feature SiteManager->Setting->PageNotFoundUrl ?

Thanks

User avatar
Kentico
Kentico
kentico_helenag - 10/8/2010 4:15:19 AM
     
RE:FileNotFound Redirection
Hello,

I was not able to reproduce the issue. I set up for example ~/News.aspx as the Page not found URL. Then I add a domain alias to site and access a non-existing page with the second domain. I am redirected correctly.

Are you able to access the error page with the second domain if you type in the URL exactly to browser?


Best regards,
Helena Grulichova

User avatar
Member
Member
francis.harvey-irisco - 10/8/2010 7:32:36 AM
     
RE:FileNotFound Redirection
Yes if i write the url it works,

but when i enter a non-existing url, the classic Kentico Server Error 404 page appear instead of mine

It work well in debug / localhost mode

I didnt use domain alias, i only use MyMachine:8095 and localhost:8096

Thanks

User avatar
Member
Member
francis.harvey-irisco - 10/8/2010 8:25:48 AM
     
RE:FileNotFound Redirection
here is the content of site configuration

Site domain name: MyMachine:8095

Domain alias Default culture
localhost (Automatic)
localhost:8096 (Automatic)
MyMachine:8095 (Automatic)

User avatar
Kentico
Kentico
kentico_helenag - 10/12/2010 5:05:49 AM
     
RE:FileNotFound Redirection
Hello,


Could you please try to use the custom error settings in your web.config?

<customErrors defaultRedirect="~/CMSMessages/error.aspx" mode="On">
<error statusCode="404" redirect="~/customerrorpage" />

More information on MSDN.


Best regards,
Helena Grulichova

User avatar
Member
Member
francis.harvey-irisco - 10/12/2010 10:52:30 AM
     
RE:FileNotFound Redirection
Ok i found that the error i got happen when the extension .aspx was not in the url

So, where can i trap the error when .aspx extension is not present ?

User avatar
Kentico
Kentico
kentico_helenag - 10/13/2010 3:48:00 PM
     
RE:FileNotFound Redirection
Hello,

Did you try the custom section in web.config?

Best regards,
Helena Grulichova

User avatar
Member
Member
francis.harvey-irisco - 10/19/2010 9:31:00 AM
     
RE:FileNotFound Redirection
It works, i use CustomErrors and HttpError tag in web.config !!

But now, the event log is full of exception "file does not exist".

Is there a way to avoid the log of these exceptions or can i delete last entry of the event log ?

Thanks
Francis Harvey



User avatar
Kentico
Kentico
kentico_helenag - 10/26/2010 3:10:21 AM
     
RE:FileNotFound Redirection
Hi Francis,


do the logs relate to really not existing file?

It is possible to disable the event logs but not select "file does not exist". Please see here: Web.config parameters for more details about event log settings.


Best regards,
Helena Grulichova

1