Hi All,
Etc/map rules only works when we add .html at the end of each url. Without .html, It does not map to appropriate url.
Below is etc/map :
Now, when we access http://localhost:4502/content/we-retail/language-masters/en/experience/arctic-surfing-in-lofoten.htm...
Links are properly resolved like below:
PROBLEM:
When we remove .html from HTML files, It does not map to proper url as below:
However,Through resource resolver It resolves in both the cases:
1) With .html:
2)Without .html
Regards,
AP
Views
Replies
Total Likes
Your screenshots are not clear. You'll need to append .html at the dispatcher level and send them over to AEM and AEM is responsible to remove the .html for outbound urls. Are you using the links without .html extensions?
Hello @Singaiah_Chintalapudi ,
Thank you for reply.
Now screen shots are clear.
We need to remove .html . Dispatcher rules are correct and working fine with or without html extension.
Problem is when we render any AEM page, and we do not add .html for links in sightly HTML, etc/map rules above does not resolve to correct url..
Hi @arvind
Please try with below.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="sling:Mapping"
sling:internalRedirect="/content/we-retail/language-masters/en/(.*).html"
sling:match="www.domain.com/$1"/>
@Asutosh_Jena_ Thank you for your response.
Problem is not when we have .html in the URL.
We need to shorten URL when there is no .html in AEM url.e.g.
In HTML,
we have below lines:
<a href="/content/we-retail/language-masters/en/experience" >TEST 1</a></br>
<a href="/content/we-retail/language-masters/en/experience.html" >TEST 2</a>
and ETC MAP Rules as below:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Mapping"
sling:internalRedirect="[/content/we-retail/language-masters/en/(.*).html,/content/we-retail/language-masters/en(.*)]"
sling:match="$1"/>
Problem is :
It does not resolve URL without .html extension as below:
Idea is to have same output for TEST 1 also.
Thank you in advance.
As per my understanding here, publish should never receive any request without .html. All request to publish should have .html extension and that should be handled in dispatcher. I believe enduser facing URL here is without any extension which is already taken care by etc/maps.
So the flow will be:
This is how the cycle will continue.
Thanks!