.htaccess - Issue trying to redirect old Urls finishing with variables using htaccess -
i have tried redirect old website urls main domain www.my_domain.tld, can't find right solution.
i have 2 kinds of url want redirect main domain:
http://www.my_domain.tld/blog/?p=125("125" number 1 999)http://www.my_domain.tld/blog/feed/?p=72("72" number 1 999)
you can use following rule in /.htaccess :
rewriteengine on rewritecond %{the_request} /blog/\?p=([0-9]+) [or] rewritecond %{the_request} /blog/feed/\?p=([0-9]+) [nc] rewriterule ^ http://domain.tld? [l,r,nc] empty question mark @ end of destination url important discards old query strings.
Comments
Post a Comment