edgarzakaryan — 2012-10-09T05:18:03-04:00 — #1
I'm using htaccess to redirect to www.mysite.com when it's written mysite.com.
But I need not to have www when it's in subdirectory. For example if I'm in www.blog.mysite.com, it should redirect to blog.mysite.com.
How I can do that?
ralphm — 2012-10-09T08:43:50-04:00 — #2
Do you expect anyone would ever type www.blog.mysite.com anyway? "www" is a subdomain like "blog", so it's unlikely that anyone would type them both.
Anyhow, I have a subdomain on my site, and if I type "www." before it the browser just goes to the subdomain anyway. Perhaps that's because I redirect "www" to the non-www version for the domain name anyway.
Just to clarify, do you prefer your site to show "www" in the address or not?
edgarzakaryan — 2012-10-09T08:59:30-04:00 — #3
I need to have it two types.
if no subdomain, I need to have www.mysite.com,
but with subdomain no www, just blog.mysite.com
dklynn — 2012-10-10T00:49:05-04:00 — #4
Have you looked at the sample code section of my signature's tutorial? Have you looked at the sticky threads for this board? It's all there (except your domain name)!