CNAME Record in .htaccess file: correct format?
Posted
by Josh
on Stack Overflow
See other posts from Stack Overflow
or by Josh
Published on 2010-03-25T08:47:00Z
Indexed on
2010/03/25
8:53 UTC
Read the original article
Hit count: 943
In my .htaccess file, I have set up several A records in the following structure:
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^substring\/substring\/etc?$
"http\:\/\/domain\.com\/newsubstring\/etc\/" [R=301,L]
Is is possible to easily set up a CNAME record in the same fashion and put it in my .htaccess file? Unfortunately, my dumb DNS (namecheap) doesn't let me change CNAME records because my site actually has hosting and isn't just a parked domain.
(I actually just want to set up a CNAME for www, since at the moment www.domain.com doesn't work for me, and only domain.com -- I'm going to point the former to the latter.)
© Stack Overflow or respective owner