We have multi-site wordpress containing more then 50 blogs/sub-site.
Our base URL to wordpress site is www.example.com/base-site/ and we have other sub-sites in it like www.example.com/base-site/site1 site2 ... etc.
Now My question is to redirect the main-site to one of the subsites but a simple redirect 301 is not working. I tried some solutions of mod-rewrite but its not working either for this main-site to redirect to sub-site.
A solution is required to Redirect
www.example.com/base-site/
to
www.example.com/base-site/site1
Solution used so far but not working for me solution1 solution2
I found a solution here If someone want to redirect the main wordpress site to its sub-site, just create the
redirect.php
file in thewp-content/plugins/
directory and put the code mentioned in the post, replace the url with your own and name of the main site in theIF
condition.