Page 3 of 3

Re: Would like to use a subdomain

Posted: Thu Mar 15, 2012 10:19 pm
by btwyx
I'm trying to get this to work, but its not working for me. I've got btwyx.com and http://www.btwyx.com pointing to my main directory, and that's working. I'm trying to get track.btwyx.com to go to btwyx.com/track, and that's not working. I've setup the DNS and track.btwyx.com returns a generic "future home of track.btwyx.com" page. I've adapted the .htaccess file (see below) but its not getting me to the directory I want (just the "future home of" page).

Code: Select all

<Limit GET PUT POST DELETE>
order allow,deny
allow from all
#disallows viewing the index of the directory
IndexIgnore *
RewriteEngine on

#subdomain-1.domain.com will map to the folder {root}/btwyx.com/subdomain-1
RewriteCond %{HTTP:Host} ^track\.btwyx\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/track/
RewriteRule ^(.*) /track/$1 [NC,L,NS]

</Limit>

Re: Would like to use a subdomain

Posted: Mon Apr 09, 2012 4:04 pm
by markf
You have to have an IP address to point the domains to. You have to have a value hosting account. Once this is done you can point the domains to the root directory and then create the directories and point the sub-domins to the sub-directory.

Re: Would like to use a subdomain

Posted: Mon Apr 09, 2012 4:19 pm
by btwyx
This is a value hosting account. I have a cname record to make track.btwyx.com point to btwyx.com which has an A record with its own IP.

So how do you do what you're suggesting?

Re: Would like to use a subdomain

Posted: Mon Apr 09, 2012 4:39 pm
by dja
Actually, value hosting is virtual name based hosting. It relies on the hostname header in http, unless Apache is configured to be listening for given sub-domain name, it will not know what to do for requests with that sub-domain name. What you need is Basic hosting which is IP based. Because it's IP based you can send any hostname to it, and if your .htaccess file is configured properly you will be able to serve up the proper pages for any given domain. Switch to basic hosting and you'll be good. Looking at your current .htaccess file, you may need to tweak a few things still.

Re: Would like to use a subdomain

Posted: Sun Sep 16, 2018 6:36 pm
by toknowjoyman
Can we configure personal hosting with sub-domains?