Here is my directory structure
main site:-
www.magentosite.com
WordPress site:-
www.magentosite.com/wordpresssite
And Here is my htaccess rule for redirect. If User goes to wordpress site then they will redirect to magentoSite.
RewriteCond %{REQUEST_URI} !^WordpresSITE/
RewriteRule .? http://www.MagentoSITE.com/ [L]
PROBLEM
Above should work as it is but I want to put if user goes to admin side of wordpress then yes they should not redirect. In short www.magentosite.com/wordpresssite/wp-admin/...
should not redirect.
The below code should go inside the
.htaccess
on the WordPress folder:Basically what I am doing is if the URL start with:
Or starts with:
It should not redirect, if it doesn’t then it redirects.