Web Hosting Talk







View Full Version : Cname


Ben Russell
07-24-2002, 02:42 PM
I was wondering if it is possible to have a CNAME record for say:
'mysite.domain.com' point to 'www.domain.com/mysite'?
Or if CNAME's have to point to actual domains (not directories)?

apollo
07-24-2002, 02:49 PM
nope! You can't do that!

You will need to do the following
1.) setup CNAME record
2.) setup WWW server (apache) to do the forwarding

enjoy!

Ben Russell
07-24-2002, 02:51 PM
Well, what I am doing is creating subdomains that need to point to a directory on a domain (like CPanel does). What is the best way to do this?

Or would it be easier just to create virtual accounts for the subdomains? I am making a system where users can sign up (sort of like hypermart) and get their own subdomain

The only reason I might not want to create virtual accounts for them is because it might make a heavier server load when there are hundreds of virtual accounts on a server.

apollo
07-24-2002, 03:49 PM
well, you do not need to create a virtual account for each user.

You can configure/set-up redirect in httpd.conf file, thus, you can create mysql backend and scripts that generate httpd.conf file with VirtualHost's and redirect rules :) And there you go, a professional redirection service.

I suggest you also read some info on different redirect codes (eg. 302....) you will probably find it in HTTP protocol RFC

Ben Russell
07-24-2002, 06:51 PM
Any tutorials on how I could go about doing this?

apollo
07-25-2002, 02:21 AM
I have found a few urls that will assist you, check out the links below.

http://httpd.apache.org/docs/vhosts/index.html
http://httpd.apache.org/docs/mod/mod_alias.html#redirect
http://httpd.apache.org/docs/mod/mod_alias.html#redirectmatch
http://httpd.apache.org/docs/mod/mod_alias.html#redirectperm
http://httpd.apache.org/docs/mod/mod_alias.html#redirecttemp

DavidU
07-26-2002, 12:33 AM
1) go to everydns.net
2) point an NS for your sub.domain.com to ns1-4.everydns.net
3) add a webhop for "sub.domain.com" --> http://where.every/poo.html

done

-davidu