Link to home
Start Free TrialLog in
Avatar of Fernanditos
Fernanditos

asked on

Removing URL parameter via .htaccess

Hi,

In my Google Analytics incoming reports I have lot of urls with a NOT MINE url parameter added at end that is leading to a page not found error:

For example:
/search/pdf/ejercicios+de+las+7+herramientas+de+calidad?fb_xd_fragment=

When the right URL is /search/pdf/ejercicios+de+las+7+herramientas+de+calidad

As you see the "?fb_xd_fragment=" is added at the end of my URL.

It seems to be a facebook button issue: http://www.google.com/search?q=fb_xd_fragment+fix&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

But what i want is to redirect this:
/search/pdf/ejercicios+de+las+7+herramientas+de+calidad?fb_xd_fragment=

to this: /search/pdf/ejercicios+de+las+7+herramientas+de+calidad

How can I do this from my htaccess ?

Please help!!

thank you
ASKER CERTIFIED SOLUTION
Avatar of dsmile
dsmile
Flag of Viet Nam image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fernanditos
Fernanditos

ASKER

As usual, I was forced to accept a solution. This did not fix my problem because I have lot of URLs with that issue, the idea was to do something without entering individual urls on the .htaccess.
@fernanditos: You are not forced to close a question if you have outstanding dialog.  You can explain a little more or ask clarifying questions.
@Fernanditos: just wanna help you out, it's not about points here. I could have helped you better if you had clarified your question since the beginning :)

In your case, try

RewriteEngine On
RewriteCond %{QUERY_STRING} ^fb_xd_fragment=$
RewriteRule ^(.*)$  /$1? [R=301,L]