Reputation: 2688
I have a ExpressionEngine install, that is running 2 websites.
Since I have added a domain to point to the second site, I need to update the old links: http://mysite.com/othersite to redirect to http://othersite.com
So, even though http://othersite.com brings up the other site, when I attempt to add:
RewriteEngine On
RewriteBase /
Redirect 301 /othersite http://othersite.com
to mysite.com root .htaccess file, it ends up causing a redirect loop for othersite.com
How can I fix this?
Upvotes: 1
Views: 90
Reputation: 51711
Change your root .htaccess
to
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)mysite.com$ [NC]
RewriteCond %{REQUEST_URI} ^/othersite [NC]
RewriteRule ^othersite/(.*)$ http://othersite.com/$1 [R=301,L]
You're getting a redirect loop because your rule is active for both the domains.
Upvotes: 1