Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Shared Hosting Support

Notices

Reply
 
Thread Tools
  #1  
Old 06-03-2008, 03:01 PM
leftie leftie is offline
Hatchling Croc
 
Join Date: Jan 2007
Posts: 43
Default htaccess ...... multi domains ????

Hi. I'm not sure about this so please bear with me.
I have three domains registered for my site, .com (registered at HG) .net and .org (parked on a nameserver).
I run a vbulletin forum and if a user who is logged into the main .com url uploads an attachment and some one from the .net or .org url clicks to open it they are taken to the .com url and asked to login. Once logged in they can open attachments whatever domain they are using.

Is this something that can be overcome by a htaccess edit ?????
Reply With Quote
  #2  
Old 06-03-2008, 04:59 PM
GatorJamyn
HostGator Guest
 
Posts: n/a
Default Re: htaccess ...... multi domains ????

If they are all aliased to the same place anyway, why not redirect all non-com traffic back to .com? This is off the top of my head, but should be workable:

Quote:
# .htaccess file start
RewriteEngine On
# RewriteCond %{REQUEST_URI} /forum/ # if you only to affect /forum/ traffic for example
RewriteCond %{HTTP_HOST} !domain\.com
RewriteRule (.*) http://www.domain.com/$1 [L,R=301]
# htaccess file end
Reply With Quote
  #3  
Old 06-03-2008, 11:25 PM
leftie leftie is offline
Hatchling Croc
 
Join Date: Jan 2007
Posts: 43
Default Re: htaccess ...... multi domains ????

Thanks. I'll try it.

Would i have to edit thar file and out my domain name where it says domain ?
Reply With Quote
  #4  
Old 06-05-2008, 10:38 AM
leftie leftie is offline
Hatchling Croc
 
Join Date: Jan 2007
Posts: 43
Default Re: htaccess ...... multi domains ????

Any help please.
Do i need to edit any on the above file .... my forum isn't in a folder /forum .. it opens direct from public_html.
Reply With Quote
  #5  
Old 06-05-2008, 11:06 AM
regentronique's Avatar
regentronique regentronique is offline
King Croc
 
Join Date: Aug 2007
Location: Quebec,Canada
Posts: 969
Default Re: htaccess ...... multi domains ????

Yes, you have to replace "domain" with your actual domain name in both places.

The forum line is already commented out so it wont matter.
Reply With Quote
  #6  
Old 06-05-2008, 01:58 PM
leftie leftie is offline
Hatchling Croc
 
Join Date: Jan 2007
Posts: 43
Default Re: htaccess ...... multi domains ????

Thank you for your help

Oh one more thing.... does this go in the public_html folder??
Reply With Quote
  #7  
Old 06-05-2008, 02:42 PM
RainbowViper's Avatar
RainbowViper RainbowViper is offline
King Croc
 
Join Date: Mar 2008
Location: St Paul MN
Posts: 814
Default Re: htaccess ...... multi domains ????

Normally, yes it does.

(There are exceptions, but only if one or more of the parked domains is pointed, through cPanel -> Parked Domains, to some directory other than public_html.)
Reply With Quote
  #8  
Old 06-05-2008, 03:09 PM
leftie leftie is offline
Hatchling Croc
 
Join Date: Jan 2007
Posts: 43
Default Re: htaccess ...... multi domains ????

Thanks for the reply RainbowViper.

(my parked domains point only to public_html)
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Was I misinformed about multi-domain multi-eCommerce hosting for Baby Croc? NJO Pre-Sales Questions 3 01-21-2008 03:53 PM
A multi-Croc performance? gwyneth Off-Topic 16 10-24-2007 11:33 AM

All times are GMT -5. The time now is 06:51 AM.