Not able to do it correctly so asking you guys. I have a domain with URLs like mydomain.com/aus/blog/index8090.html?page_id=115 mydomain.com/aus/blog/index8090.html?page_id=115 mydomain.com/aus/blog/index4f61.html?p=66 mydomain.com/aus/blog/index4f61.html?p=91 I want to 301 redirect all these pages to mydomain.com/aus/ How can I do that? Please help me. Thanks in advance for your help.
Simply find on the web htaccess generator and it will do it for you. It is really easy to find and use.
//301 Redirect Old File Redirect 301 mydomain.com/aus/blog/index8090.html?page_id=115 mydomain.com/aus/ //301 Redirect Entire Directory RedirectMatch 301 mydomain.com/aus/blog/index8090.html?page_id=115(.*) mydomain.com/aus//$1 Code (markup):