Hi all,
In our setup we have configured AEM (6.3) not use use any extension in URLs.
So we have configured author + publish with StripHtmlExtension equals to true for Link Checker Transformer.
This is working perfectly for pages being sent to the browser. All links in the response are stripped from their extension.
It is only not working for the Location 302 redirect by a vanity. The location still contains a .html suffix.
The Link Checker Transformer has no effect on this vanity redirect.
When I enter a vanity in JCR resource resolver I get following back:
http://localhost:4503/vanity -->
RedirectResource, type=sling:redirect, path=/vanity, values={sling:target=/content/www-mysite-be/nl/page.html, sling:status=302}
How can we make sure that this extension in sling:target is also stripped?
PS. I read all forum entries on using html suffix or not and also the pros/cons from SEO perspective. I'm aware of all these topics, but still we want to go extension less. AEM seems to officially support it with the StripHtmlExtension config but it's not a bulletproof solution and according to this discussion not working for vanities.
Thanks in advance.
Johnny
Solved! Go to Solution.
From what I understand this is hardcoded. Changing it would require a patch to the Sling mapping code (see [1]). Maybe you want to raise this as a ticket first in the Apache Sling Jira [2].
Jörg
From what I understand this is hardcoded. Changing it would require a patch to the Sling mapping code (see [1]). Maybe you want to raise this as a ticket first in the Apache Sling Jira [2].
Jörg
As workaround I have added following rewrite rule in Apache:
Header edit Location ^/(.+)\.html$ /$1
Views
Replies
Total Likes
Views
Likes
Replies