Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Paramaters on the urls are not getting removed!

Avatar

Level 3

While using R=301 redirect the paramaters on the urls are not getting removed!
E.g www.xyz.com/content/we-retail/us/en/technology#web
=> www.xyz.com/content/we-retail/us/en/science#web

Rule used

^/content/we-retail/us/en/technology/#india$ /content/we-retail/us/en/science.html [NC,R=301,L]

 

Cannot use the flag QSD as i am on version 2.2

 

The redirection is sucess but #web persists!
Anyone knows how to fix this?

4 Replies

Avatar

Level 4

Hi @sachindey1231 ,

 

Can you try using the below rule (added '?' at the end of target url)

^/content/we-retail/us/en/technology/#india$ /content/we-retail/us/en/science.html? [NC,R=301,L]

 

 

Reference:

https://linchpinseo.com/htaccess-rules/ 

Avatar

Community Advisor

try with https://httpd.apache.org/docs/trunk/rewrite/flags.html#flag_qsa

I think #anchor does not propagate to servers , so should not be able to add checks on that.



Arun Patidar

Avatar

Level 3

Thanks @arunpatidar I have already given it a try but it does not work. I also think that this cannot be done directly using a flag. I have taken more of customized approach to solve this now!

Avatar

Administrator

@sachindey1231 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni