Issue image I’m having this issue when Using a standard RTE plugin hyperlink feature in AEM.
Clicking on the < ahref> links work correctly where it routes me to a correct shortened URL (/usa-en/delete/smart-factory.html) as expected.
However hovering on the link or view source of the markup generated seems to an issue where links shows an absolute path with (/content/te-com/usa/en/pages/….) which is impacting our SEO.
In fact Only the first link is getting shortened and all other links show an absolute path (/content/te-com/... path) when I hover over the links. I suspect that the cached links have an issue with the path getting shortened.
Node storage in JCR:
<p>Hello <a href="/content/te-com/usa/en/pages/delete/smart-factory.html">one</a> and <a href="/content/te-com/usa/en/pages/delete/pgp-test0.html">two</a>. </p>
Generated HTML markup from source :
<div class="global-rte-std-bold global-labels parbase section"><p>Hello <a href="/usa-en/delete/smart-factory.html">one</a> and <a href="/content/te-com/usa/en/pages/delete/pgp-test0.html">two</a>. </p>
However when I add a shift + Enter when using the RTE a
tag is added and the URL somehow gets shortened for all the links as expected as shown in the below markup. Node storage is still the same as above like the one without shift+enter
Markup Generated (observe that the URL's are shortened):
<div class="global-rte-std-bold global-labels parbase section"><p>Hello <a href="/usa-en/delete/smart-factory.html">one</a> and<br><a href="/usa-en/delete/pgp-test0.html">two</a>. </p>
Also we have the below rewrite rule in Apache that actually comes into effect when I click the link. I suspect the cached URL's with RTE have this issue.
RewriteRule ^/?usa-en/?(.*)$ /content/te-com/usa/en/pages/$1 [PT,QSA].
Note : We have not customized the RTE plugin and its a standard Hyperlink plugin we have been using on AEM 6.2
Code used here is a simple
I wonder how it works correctly with a shift + Enter and not when I have the links on the same line.
Any help on this would be appreciated. Thanks
http://<host>:<port>/system/console/jcrresolver
that allows you to test resource resolution and mapping. It also lists all the rules applied to the tested URL and their locations. – toniedzwiedz