Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I have a and they both show the same information and point to the same folder.

How can I redirect all visitors to

share|improve this question
I see the htaccess tag, but you should specify your HTTPD so no one assumes. – Tim Jul 17 '12 at 20:03
There is a complete answer on stack overflow about this. Look [here][1]. [1]:… – MahmutBulut Jul 17 '12 at 20:16

1 Answer 1

up vote 4 down vote accepted

Assuming the HTTPD is apache:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^demo\.* [NC]
RewriteRule .* [L]
share|improve this answer

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.