It works fine if I try to open a non existing page with url like /notexists or /not/exists (my custom not found page is displayed).
Howewer if I try to go to a url containing a dot (e.g. /not.exists) it doesn't work and web server standard 404 error is displayed:
404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Another issue is that when it works (with url /notexists and my custom page) it returns status code 200.
So I have 2 questions:
How to return 404 status code when a page is not found?
How to make it work when a url contains a dot?
P.S. I'm running Umbraco 4.7.2 and judging by this forum changes were made to 404 handling and new bugs introduced since 4.7.2. I still hope someone will share their succesfully working setup.
Using a dot in the URL automatically inclines the part after the dot is the extension, e.g. foo.aspx Umbraco will not handle any page with a different extension than .aspx, as mentioned in this invalid issue: http://issues.umbraco.org/issue/U4-1282
You can return a 404 status yourself in the 404handler:
Dot in url breaks 404 handler
Hi guys,
I implemented my 404 handler as described here:
http://our.umbraco.org/wiki/reference/files-and-folders/files-in-the-config-folder/404handlersconfig
and here:
http://our.umbraco.org/wiki/how-tos/how-to-implement-your-own-404-handler
It works fine if I try to open a non existing page with url like /notexists or /not/exists (my custom not found page is displayed).
Howewer if I try to go to a url containing a dot (e.g. /not.exists) it doesn't work and web server standard 404 error is displayed:
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Another issue is that when it works (with url /notexists and my custom page) it returns status code 200.
So I have 2 questions:
How to return 404 status code when a page is not found?
How to make it work when a url contains a dot?
P.S. I'm running Umbraco 4.7.2 and judging by this forum changes were made to 404 handling and new bugs introduced since 4.7.2. I still hope someone will share their succesfully working setup.
Thank you.
Using a dot in the URL automatically inclines the part after the dot is the extension, e.g. foo.aspx
Umbraco will not handle any page with a different extension than .aspx, as mentioned in this invalid issue: http://issues.umbraco.org/issue/U4-1282
You can return a 404 status yourself in the 404handler:
is working on a reply...