Template url gives home page template with status 200
Hi all,
I have a Site root node which contains a property 'umbracoInternalRedirectId' which is used to link to the desired home node.
Now, we have a template called Team and another one called Contact.
When we surf to these urls we get the selected home node from above as output in the frontend with a status 200. But this isn't correct, these pages don't exist in the backoffice so we want a 404 to be returned and our 404 custom page.
When I disable this internalRedirect we get the desired result.
doesn't have any effect, tried it with true and false, it still gives me a 200 status code and the selected home page from the Site node content picker.
I think you also might need to remove the searchfortemplate handler from the 404handlers.config file. I’ve never really gotten why this handler was in there, but we remove it to fix this issue.
Template url gives home page template with status 200
Hi all,
I have a
Site
root node which contains a property 'umbracoInternalRedirectId' which is used to link to the desired home node.Now, we have a template called
Team
and another one calledContact
. When we surf to these urls we get the selected home node from above as output in the frontend with a status 200. But this isn't correct, these pages don't exist in the backoffice so we want a 404 to be returned and our 404 custom page.When I disable this internalRedirect we get the desired result.
To following changes are already provided:
Any ideas?
Thanks!
/Michaël
I think you need to set another setting to false.
This one
disableAlternativeTemplates
If you set that to false you can't call a page with a alternative template.
eg. www.example.com/about-us/home
Where home is the name of a template.
Dave
Dave,
doesn't have any effect, tried it with true and false, it still gives me a 200 status code and the selected home page from the Site node content picker.
Any other ideas?
Thanks!
/Michaël
I think you also might need to remove the searchfortemplate handler from the 404handlers.config file. I’ve never really gotten why this handler was in there, but we remove it to fix this issue.
https://our.umbraco.com/documentation/Reference/Config/404handlers/
Hi Michaël,
Looking at our projects I must say Kevin is right. You need to remove that as well.
Dave
Thanks guys, is working now!
/Michaël
is working on a reply...