Here's what I want to do.
I want to turn http://www.mywebsite.com/folder/subdomain/index.html into http://subdomain.mywebsite.com.
So, basically this means there's a folder in a subdirectory of my root that I want to use as a root for a subdomain. So let me use a real website just to be very clear.
http://www.microsoft.com/windows/longhorn/index.html
http://longhorn.windows.com
I want the second, not the first to show up in the address bar. My host uses cpanel for the administration and I can easily add a subdomain like longhorn.windows.com. And, when I try to point my browser in that direction by typing it into the address bar, it loads the site and the address bar then appears similar to www.microsoft.com/windows/longhorn.
When I create a subdomain from cpanel, it then creates a folder off of the root public_html. So, for example, let's say I create longhorn.microsoft.com. It will then create a folder called longhorn that you can see from the root of my domain. Must this folder absolutely exist? Because, I want to redirect the domain longhorn.microsoft.com to another folder located here public_html/windows/longhorn/. This being said, it'd seem redundant to have two folders called longhorn and only one of them to be used.
I know this requires some kind of .htaccess lines but I'm not sure how to do it. As well, when I do create the file with the correct code, where does the file need to be? In the public_html directory or the actual subdirectory?
Any answers would be veeeerrrrrrryy appreciated!!
I want to turn http://www.mywebsite.com/folder/subdomain/index.html into http://subdomain.mywebsite.com.
So, basically this means there's a folder in a subdirectory of my root that I want to use as a root for a subdomain. So let me use a real website just to be very clear.
http://www.microsoft.com/windows/longhorn/index.html
http://longhorn.windows.com
I want the second, not the first to show up in the address bar. My host uses cpanel for the administration and I can easily add a subdomain like longhorn.windows.com. And, when I try to point my browser in that direction by typing it into the address bar, it loads the site and the address bar then appears similar to www.microsoft.com/windows/longhorn.
When I create a subdomain from cpanel, it then creates a folder off of the root public_html. So, for example, let's say I create longhorn.microsoft.com. It will then create a folder called longhorn that you can see from the root of my domain. Must this folder absolutely exist? Because, I want to redirect the domain longhorn.microsoft.com to another folder located here public_html/windows/longhorn/. This being said, it'd seem redundant to have two folders called longhorn and only one of them to be used.
I know this requires some kind of .htaccess lines but I'm not sure how to do it. As well, when I do create the file with the correct code, where does the file need to be? In the public_html directory or the actual subdirectory?
Any answers would be veeeerrrrrrryy appreciated!!
