Samrc Posted September 21, 2009 Posted September 21, 2009 I have several domain names parked on a .com here at TCH. When one of the parked domains (.net, .us, etc) is put into the browser, it shows the parked domain address as URL while showing the content of the .com website. How do I make those resolve to the .com address? Piece of code? Addition to .htaccess file? Thanks. Quote
TCH-Bruce Posted September 21, 2009 Posted September 21, 2009 Sami, you can try this in your .htaccess file. >RewriteEngine on RewriteCond %{HTTP_HOST} !^your-domain\.com [NC] RewriteRule ^/(.*) http://your-domain.com/$1 [L,R=permanent] Quote
Samrc Posted September 22, 2009 Author Posted September 22, 2009 Tried that. No Joy. But your posting gave me the direction to go. And this did work so if ourdomain.net is accessed with or without the www., the server will send the visitor to our primary domain at the www.ourdomain.comand show that .com address in the address bar. >RewriteCond %{HTTP_HOST} ^ourdomain.net$ [OR] RewriteCond %{HTTP_HOST} ^www.ourdomain.net$ RewriteRule ^/?$ "http\:\/\/www\.ourdomain\.com" [R=301,L] Put one of those statements in for EACH of the parked domains. Now our visitors will only get our main domain.COM address in the URL Thanks! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.