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 saw this: http://serverfault.com/questions/58762/how-to-redirect-root-and-only-root-via-htaccess and it's close, but not quite.

I am in the middle of rewriting a site, and would like to be able to send users from:

http://myfullurl.com

to:

http://mylandingpageurl.com

While retaining the ability to test the site at:

http://myfullurl.hostingprovider.com
share|improve this question

1 Answer 1

up vote 2 down vote accepted

Use mod_rewrite like this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^myfullurl\.com$ [NC]
RewriteRule ^(.*)$ http://mylandingpageurl.com/$1 [R=301,L]
share|improve this answer
    
Worked like a charm, does exactly what it needed to do. Thanks! –  Mike Fiedler Dec 15 '09 at 13:00

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.