Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I saw this: 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:


While retaining the ability to test the site at:
share|improve this question
up vote 2 down vote accepted

Use mod_rewrite like this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^myfullurl\.com$ [NC]
RewriteRule ^(.*)$$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


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.