Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

sling:internalRedirect is rewirtting the internal url but truncating the url from #.

Avatar

Not applicable

If a url is like  -  content/test/en_us/hello.html#button in the below specification,

sling:match : mypage/

sling:internalRedirect : content/test/en_us/

After url rewritting it is creating above url like : mypage/hello.html , here it removes # value from the url.

expected to bo : mypage/hello.html#button

Can any one please help me out here why it is happening like this???

6 Replies

Avatar

Level 7

Try using 

sling:match \[^/]+/mypage/ and see if it works.

 

Thanks

Tuhin

Avatar

Not applicable

Hi Tuhin,

my map structure is :

map -> http -> www.mysite.com ->  mypage

and mypage sling:Mapping node has the below property

sling:match : mypage/

sling:internalRedirect : content/test/en_us/

on doing so it rewrite the url from : /content/test/en_us/hello.html#button  to : www.mysite.com/mypage/hello.html

here I expect #value to be there in the url.

I have changed sling:match as your advice.

sling:match : \[^/]+/mypage/

Now it is not rewirtting my url it is keeping as it is like : /content/test/en_us/hello.html#button

expected to be www.mysite.com/mypage/hello.html#button.

Can you please help me if I am doing something wrong here or how can we fix this issue?

Thanks,

Avatar

Level 7

Hi,

After this said change could you please try hitting "www.mysite.com/mypage/hello.html#button" and see if this works or not?

Thanks

Tuhin

Avatar

Not applicable

Hi Tuhin,

I am pointing to url rewritting in content responce. like below.

<a href="https://forums.adobe.com/content/test/en_us/hello.html#button">LEARN MORE</a> this was

rewritten to <a href="http://www.mysite.com/mypage/hello.html">LEARN MORE</a>

I am expecting this like : <a href="http://www.mysite.com/mypage/hello.html#button">LEARN MORE</a>

After the changes you mentioned it is not rewritting the href in responce.

It is same : <a href="https://forums.adobe.com/content/test/en_us/hello.html#button">LEARN MORE</a>

Thanks,

Avatar

Not applicable

Hi Tuhin,

Actually this map configuration it was working fine earlier, I don't know may be some setting or property changes it is creating this issue.

Can you please help me what changes may can create this issue.

Thanks,

Avatar

Not applicable

If anyone can help here with this log. It is clear from log AEM LinkCheckerTransformer is not functioning correctly even if all configuration are same.

In my local :

 com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformer href attribute rewritten from /content/test/en_us/platforms/connect.html#testPage to http://local.myweb.com/platforms/connect.html#testPage

In dev :

com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformer href attribute rewritten from /content/test/en_us/ideas/educator/future-education.html#mypage to http://dev.myweb.com/highered/ideas/educator/future-education.html

 

Thanks in advance if any AEM support team can find this AEM functionality issue.

Avatar

Not applicable

Yeah I have compared it is exactly the same configuration as in atttached image.