Hi devs,
I'm trying to build a 404 setup that works for solutions that do not use a primary domains.
My solution has 10 languages that all have to work on the same domain, eg.
domain.com/dk
domain.com/uk
domain.com/de
...
Since i'd like to have a seperate 404 page for each language, i'm trying to build a module that can sniff out the area qualifier (/dk, /uk, /de) part of the requested URL and based on that find the correct 404 page to show.
The highlighted part of the URL below i can use to find the area and hence the 404 page :
domain.com/dk/segment1/segment1/page-doesnt-exist.html (this only work if there is a area qualifier. so i'd have to make a fallback rutine)
I've made this logic, but my problem now, is that i'd like to stay on the current URL, give a 404 status code, but show the output that would otherwise be shows if i visited the 404 page normally.
I've tried using the Dynamicweb.Notifications.Standard.Page.NotFound since this made the most sence, but i don't have access to a pageview here, so i cant replace the output, can i?
I'm hoping someone has built this before, and can help me out :)
// Martin