Would like to use a subdomain

Web hosting discussion, programming, and shared and dedicated servers.
25 posts Page 3 of 3
by btwyx » Thu Mar 15, 2012 10:19 pm
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>
by markf » Mon Apr 09, 2012 4:04 pm
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.
by btwyx » Mon Apr 09, 2012 4:19 pm
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?
by dja » Mon Apr 09, 2012 4:39 pm
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.
by toknowjoyman » Sun Sep 16, 2018 6:36 pm
Can we configure personal hosting with sub-domains?
25 posts Page 3 of 3

Who is online

In total there are 25 users online :: 0 registered, 0 hidden and 25 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 25 guests