I have a demo.domain.com and domain.com they both show the same information and point to the same folder.
demo.domain.com
domain.com
How can I redirect all demo.domain.com visitors to domain.com?
Assuming the HTTPD is apache:
RewriteEngine on RewriteCond %{HTTP_HOST} ^demo\.* [NC] RewriteRule .* http://domain.com/ [L]
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
By posting your answer, you agree to the privacy policy and terms of service.
tagged
asked
11 months ago
viewed
105 times
active
Get the weekly newsletter!
see an example newsletter
By subscribing, you agree to the privacy policy and terms of service.