How to REMOVE a specific dynamic string from URLs with php or htaccess??

Discussion in 'PHP' started by Cyrus255, Nov 17, 2009.

  1. #1
    Please help, apparently some website is arbitrarily adding dynamic query strings to some of my urls and they actually rank and it's causing problems for me. Since I can't get them to stop, and I don't mind the links really, I would prefer to create a redirect or rewrite to get rid of the string.

    Basically if my url is mysite.com/mypage/?annoying+dynamic_string

    How would I get it to redirect, remove, rewrite, that dynamic string? I'm abysmal with htaccess rules.

    Like RewriteRule ^/mypage/ /mypage/?annoying+dynamic_string

    how would I do that? (but with wildcard instead of mypage since I want it to stop for all pages).
     
    Cyrus255, Nov 17, 2009 IP