Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Append / in the shortened, resolved URL

Avatar

Level 4

There's an author  URL with /content/.../.../form.A1-T5-*.html#/.

The shortened URL www.domainname/form.A1-T5-*  

I want a  slash to be appended at the end of the URL without which a script doesn't load and the form is blank.

www.domainname/form.A1-T5-*/

A1-T5 is a model name which is dynamic and  keeps getting updated for the respective models and 

-* is appended through jquery.

Script loads for this URl www.domainname/form.A1-T5-*/#/

#/ gets appended when / is appended in the end, so I'm trying to append a slash.

It works in author and publsiher but does not work in dispatcher. Is there a way / can be appended in the end to this dynamic URL without breaking the static URL using sling mapping or is there any other approach I need to use?

www.domainname/form/#/

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @chinmayis865517 ,

If I understand correctly, your dispatcher rule is stripping off the forward slash (/) from the URL. You will have to add additional rewrite rules in order to retain / at the end of URL. Please go through the below documentation which clearly explains how to achieve this. https://www.albinsblog.com/2018/04/how-to-implement-extension-less-urls-in-adobe-experience-manager....

 

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

Hi @chinmayis865517 ,

If I understand correctly, your dispatcher rule is stripping off the forward slash (/) from the URL. You will have to add additional rewrite rules in order to retain / at the end of URL. Please go through the below documentation which clearly explains how to achieve this. https://www.albinsblog.com/2018/04/how-to-implement-extension-less-urls-in-adobe-experience-manager....

 

Avatar

Level 4

Hi @Anish-Sinha ,

 

Thank you for sharing the solution. I have included /content/.../.../(.*).html to sling:internalRedirect and 

$1/$ value to sling:match property but / does not get appended to the dynamic path that is included using jquery and works when the form is visited directly that has not dynamic ID  . Should I resolve  it using  resourceResolver() in the back end?