Append / in the shortened, resolved URL | Community
Skip to main content
New Participant
March 14, 2022
Solved

Append / in the shortened, resolved URL

  • March 14, 2022
  • 1 reply
  • 1871 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Anish-Sinha

Hi @chinmayish ,

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.html#.Yi9bNRDMJO8

 

1 reply

Anish-Sinha
Anish-SinhaAccepted solution
Employee
March 14, 2022

Hi @chinmayish ,

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.html#.Yi9bNRDMJO8

 

New Participant
March 21, 2022

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?