|
Answer» Hello all,
I have a question about how to properly set up cname records for a subdomain that points to my domain (EG: music.zylblog.info, which is the exact case I am asking about!) Here is the predicament: The record looks like this:
CNAME music is an alias of zylblog.info with automatic TTL
and I can access http://music.zylblog.info BUT, I can not access http://www.music.zylblog.info
My question is this: How can I make it so that www.music.zylblog.info works? (And any other SUBDOMAINS I choose to add..) Also: Is there another way to do this through Apache? (Since I have few "sub-blogs", DNS configuration works fine for now).
Thank you for your attention in this matter, Jesse Zylstra
P.S. music.zylblog.info is a real site, but I am not near finished developing it yet -- don't expect much if you are trying to figure out what I have been up to. You see, "www" is actually a virtual sub-domain of zylblog.info which servers treat as the default.
Add this to .HTACCESS file in root folder of music subdomain, assuming your host supports it:
Code: [Select]RewriteCond %{HTTP_HOST} ^music.zylblog.info [NC] RewriteRule ^(.*)$ http://www.music.zylblog.info/$1 [R=301,L]
I'm not sure if that works for subdomains, but try it anyway.Nope, unfortunately it did not. Try this:
Code: [Select]RewriteEngine On RewriteRule ^http\:\/\/music\.zylblog\.info\/(.*)$ http://www.music.zylblog.info/$1 [R=301,L] That also did not work. It seems to me that we should be changing something in Apache itself, but I have no idea what. End of the line, eh? It looks that way.
Sorry I haven't got a SOLUTION. You could try over at webmaster-talk.com.
|