Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

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]
share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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