Paramaters on the urls are not getting removed! | Community
Skip to main content
New Participant
October 18, 2022

Paramaters on the urls are not getting removed!

  • October 18, 2022
  • 3 replies
  • 1288 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

kautuk_sahni
Employee
January 8, 2024

@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
arunpatidar
New Participant
October 18, 2022

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
New Participant
October 25, 2022

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!

New Participant
October 18, 2022

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/