Using .htaccess, I have tried some things to redirect Urls with variables to main the domain www.my_domain.tld
, but I didn't find the right way.
I have 2 kinds of Urls that I want to redirect to my main domain:
http://www.my_domain.tld/blog/?p=125
("125" could be any number from 1 to 999)http://www.my_domain.tld/blog/feed/?p=72
("72" could be any number from 1 to 999)
What I am doing wrong?
You can use the following rule in /.htaccess :
Empty question mark at the end of the destination url is important as it discards the old query strings.