I need to create a redirect so that the URL

domain1.mysite.com/user/register

goes to

differentsite.com/user/register

That's the only URL I need to redirect (the rest of domain1.mysite.com stays where it is). There is only one htaccess file for the whole site (www.mysite.com, domain1.mysite.com, domain2.mysite.com, etc), so I can't just redirect /user/register because www.mysite.com/user/register shouldn't be redirected.

(I could probably figure this out eventually but mod_rewrite rules and the flu don't mix.)

Thanks!

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

It should be something along the lines of:

RewriteCond %{HTTP_HOST} ^domain1.mysite.com$ [NC]
RewriteRule ^user/register$ http://differentsite.com/user/register [R=301,L]
link|improve this answer
+1. Beat me to it. – Kyle Smith Oct 23 '09 at 14:59
Perfect!! Thanks. – Eileen Oct 23 '09 at 15:15
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.