OK, I looked all over the forum for something similar to this and I could not find. I am sure it is out there, but I can't find it - so here goes.
I have a e-commerce store that is located and the address is:
store.domain.com
Now our main hosting for our site domain.com is with NetSol, and currently there is a redirect setup to send anyone who goes to domain.com or www.domain.com it redirects them to store.domain.com. Works great, no problems with that. We plan to use domain.com in the future and have the store.domain.com branch off of it but it will still be on a totally different server.
The way we are required to setup our store.domain.com is through the use of a CNAME. So I setup a CNAME Record that goes something like:
Alias "store" refers to other host "11233.56789.servertrust.com."
If I understand CNAME correctly essentially store.domain.com is an alias for 11233.56789.servertrust.com.
So here is my issue....
When a user directly types store.domain.com into their browser it works perfect, when they type domain.com it works perfect, when they type www.domain.com it works perfect, but when they type www.store.domain.com it returns an error saying it can't find the server.
I thought I would try to do another CNAME and make www.store an alias also. But this is an problem because it returns a url that causes issues.
I guess what I am asking is if there is a way to, and if it would be correct to, redirect www.store.domain.com to store.domain.com (without the www)
I do have this in my .htaccess file:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?store\.domain\.com$ [NC]
RewriteRule .* http://store.domain.com/ [R=301,L]
But it does not seem to do anything.
Any help is greatly appreciated and if any clarification is required please let me know.
Thanks in advance
P