What is the best way to translate shortened URL's ?
I was going through the documents & the only way I could find was via sling:alias.
While testing sling:alias on few of the content pages we can see that the full URL's render perfectly but it doesn't work on shortened URL's.
(Note - The shortened URL's are driven by Sling Mappings and adding values of sling:alias in sling-mappings is not a feasible solution)
Is there any other best way to design this solution or is it not feasible?
Views
Replies
Total Likes
MOst of the docs I read about this - such as this show full URLs - -How to translate the page URL – Clay Tablet Technologies
I am checking with the team as well.
Views
Replies
Total Likes
It works for URL shortened by Dispatcher Rules
Like - domain.fr/support-french.html > domain/content/test/fr/fr/support.html
But doesn't work for URL's that have sling mappings rules on them
Like- domain.fr/categoryname-french/productname-french.html > 404
Sling Mapping exist as -
content/test/fr/fr/categoryname/productname internally redirects to content/test/fr/fr/categoryname/subcategoryname/rangename/productname
Wondering if there is any way AEM is be able to identify alias while mapping URL's
Views
Replies
Total Likes
Do you mean vanities by shortened urls?
If yes, then you could take advantage of vanity configuration in the page properties, that gets saved on jcr:content as 'sling:VanityPath' property. Add this additional property to the translation workflow and even manage the redirects using this vanity (you would need to enable vanity in dispatcher configuration).
*sling vanity is different than sling mapping
Views
Replies
Total Likes
Sling Mappings already exist & the ask is just to translate the URL's that are shortened by the sling mappings as explained in the comment above.
Views
Replies
Total Likes
Hi,
in my experience typically i'm using the resource resolver factory for the outgoing URL and rewrite URL on apache for the incoming rule.
As you can see from this image, typically we are using the apache to rewrite the short url, in this way when the request come into AEM has the same path that we have in the repository.
The outcoming url are configured by using a regex in the Apache Sling Resource Resolver Factory:
If you need more details, you can check the following documentation which describe all the way to manage the URL:
Views
Replies
Total Likes
Here is the best practice and it does discuss URLS. However - not shortened URLS: SEO and URL Management Best Practices
This would be the guideline to follow.
Also - still waiting to hear back from the team.
Views
Replies
Total Likes