Jump to content

Recommended Posts

Posted

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.

Posted

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]

Posted

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!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...