I am trying to redirect the homepage of the old site site1.com]
to the homepage of the new site site2.com]
, excluding subpages and parameters.
Redirects like:
site1.com – > site2.com redirect
site1.com/ – > site2.com redirect
site1.com/subpage/ – no redirect
site1.com/index.php?id= – no redirect
site1.com/?parameter= – no redirect
2
Answers
You can use the following rule in your
site1/.htaccess
:Could you please try following. Basically looks for if either query string is empty or request uri is empty then redirect to other domain site.