Hi,
I'm working on the error page for multiple countries and languages. I'm using the ACS common for error handling and have one domain for all countries and languages.
Content structure :
/content/company/de/en/....
/content/company/de/de/....
/content/company/fr/en/....
/content/company/fr/fr/....
Views
Replies
Total Likes
Hi,
In case of 404, you need to set status 404 and defined error pages for domains.
You can use the various conditions to defined page per domain.
The error pages can be hosted i AEM for each domain
<LocationMatch "/de/en/(.*)">
ErrorDocument 404 /de/en/404.html
</LocationMatch>
<LocationMatch "/fr/en/(.*)">
ErrorDocument 404 /fr/en/404.html
</LocationMatch>
Hi Arun,
Thanks for the quick response.
I do have the ErrorDocument property set in the vhost files (both DE and FR) :
DE vhost : ErrorDocument 404 /de/errors/404.html
FR vhost : ErrorDocument 404 /fr/errors/404.html
Thanks,
Hiral
@hiral-shah It should work with @arunpatidar Solution. But if it is not working the issue is with some thing else.
And also i see fromt he screenshot attached
why on dispatcher we are rendering from /content/<name>/fr/content/<name>/fr/fr/home1234.html
What is the exact ur from publisher? There is some rule or any configuration that is redirecting /content/fr on top of /content/<name>/fr. Please check from that prespective
Hi Jagadeesh,
I am trying to find the reason for /content/<name>/fr on top of the URL.
But my main query is - the existing pages for FR are getting mapped properly with the same set of rules. Also, the response from the publisher is 404 and that is why the error page is getting mapped on publisher. 404 is responded to the dispatcher as well but error page is not mapped in this case.
Thanks,
Hiral
The error page you are receiving right now is from AEM. In this case custom the error page should be return. Can you also check if the error page is published or not?
Hi Arun,
The error pages are published and rendered properly when requested individually.
Also, I was checking the response headers for the existing and non-existing pages.
It seems like the existing and non-existing pages are getting mapped properly at the fastly CDN ( x-cache being a fastly header). Let me know, in case my understanding is wrong.
Unfortunately, its at the Cloudflare CDN where this issue is happening.
Any suggestion?
what is the response code for non existing page?
Hi Arun,
The response status for non-existing pages is 404, for both fastly and cloudflare.
Hello @arunpatidar @Jagadeesh_Prakash,
Here is the snippet from the log files :
Dispatcher logs :
dispatcher access log - "GET /fr/testagain.html HTTP/1.1" 404 237 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"
aem dispatcher log - "GET /content/company/fr/fr/testagain.html" 40451ms [companypublishfarm/0] [actionnone] dev.company.fr
Publisher logs :
request log -
[792] -> GET /content/company/fr/fr/testagain.html HTTP/1.1
[792] <- 404 text/html 34ms
error log - GET /content/company/fr/fr/testagain.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/company/fr/content/company/fr/fr/testagain.html not found
access log - "GET /content/company/fr/fr/testagain.html HTTP/1.1" 404 455 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"
There is not much in the logs.
Views
Likes
Replies