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

Notices

Reply
 
Thread Tools
  #1  
Old 02-23-2007, 06:36 AM
matheson matheson is offline
Hatchling Croc
 
Join Date: Feb 2007
Posts: 1
Default unlimited domains?

I just signed up for Baby Croc.

I can't figure out where to make new domains.
FAQ and searching posts doesn't turn up anything... only addon etc.

I have several websites, all hosted with the evil Infinology (from whom I'm 'trying' to flee at break-neck speed!)

If I understand correctly, addon will create a subdomain, praking one ontop of another, eg indigoivories.mathesonbayley.com

Two of my sites are mathesonbayley.com and indigoivories.com

How do I set that up as separate domains?

Thanks
Reply With Quote
  #2  
Old 02-23-2007, 07:14 AM
noonoo noonoo is offline
Hatchling Croc
 
Join Date: Nov 2006
Posts: 20
Default Re: unlimited domains?

You need to use the addon domain feature in cpanel.

This will create and work out of a folder in your main account but it is a fully functional domain with its own email, ftp etc.

Lets say your main account is domain1.com you could create an addon for domain2.com, its address will be domain2.com.

The only thing that also happens is because the addon domain is in the main websites folder it could also be accessed through the main domain. So if you called your addon domain folder addondomain then it could be accessed with http://www.domain1.com/addondomain/index.html as well as www.domain2.com. It does not really matter as you could choose a folder name thats not likely to be tried and possibly block access through the main domain with the .htacess file.
Reply With Quote
  #3  
Old 02-28-2007, 09:04 PM
jwied jwied is offline
Hatchling Croc
 
Join Date: Feb 2007
Posts: 4
Default Re: unlimited domains?

How would you setup the htaccess file to block access to the addon sites?
Reply With Quote
  #4  
Old 02-28-2007, 09:30 PM
PsiPro PsiPro is offline
King Croc
 
Join Date: Nov 2005
Posts: 812
Default Re: unlimited domains?

put the .htaccess in the sub folder for that domain.
Reply With Quote
  #5  
Old 03-01-2007, 12:26 PM
jwied jwied is offline
Hatchling Croc
 
Join Date: Feb 2007
Posts: 4
Default Re: unlimited domains?

right, but what goes in the htaccess file. I only know how to use it to password protect.
Reply With Quote
  #6  
Old 03-04-2007, 05:52 PM
rich318 rich318 is offline
Hatchling Croc
 
Join Date: Mar 2007
Posts: 1
Default Re: unlimited domains?

Quote:
Originally Posted by jwied View Post
right, but what goes in the htaccess file. I only know how to use it to password protect.
You can use mod_rewrite to keep visitors from accessing the subdomain/add-on domain from the base domain.

if your base domain is example.com and you have an add-on domain addondomain.tld, the add-on will be accessable at http://addondomain.tld/ AND http://example.com/addondomain/ (unless you named the folder something else when you created the add-on domain)

To disallow access by visitors using http://example.com/addondomain/ use the following rewrite rule in the add-on domain's root folder .htaccess file (/public_html/addondomain/.htaccess)

RewriteEngine on
RewriteCond %{HTTP_HOST} !addondomain\.tld$ [NC]
RewriteRule .* /404.shtml [L]



The Rewrite condition:

RewriteCond %{HTTP_HOST} !addondomain\.tld$ [NC]

does a case-insensitive check on the http-host and returns true if the folder is not being accessed using http://(optional subdomains)addondomain.tld/

The rule:

RewriteRule (.*) /404.shtml [L]

Shows the base domain's 404 page http://example.com/404.shtml

Just be sure to change addondomain\.tld to your add-on domian's name and place at the top of your .htaccess file for each add-on name you want protect

Rich
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

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