I have an .htaccess file that is shared between a number of websites. Each of these sites are served from the same set of files but load a different configuration based on the domain name they run on.
However, I need to add a number of 301 redirects and I'm running into a small problem. I only want the redirects to execute for a specific domain, not for each of the domains the .htaccess is used by. E.g. I want to redirect
mysite1.com/some/path to redirect to
mysite2.com/some/other/path but the problem is that if
/some/path also exists for
mysite3.com it's also redirected.
What I basically need is something like:
<if host = mysite1.com> Redirect /some/path http://mysite2/some/other/path </if>
Is this possible in .htaccess?