How can i make a mod_rewrite to redirect any subdomain to a file/folder
like http://SOMEFILE.domain.com to be redirected to http://domain.com/SOMEFILE.html ???
How can i make a mod_rewrite to redirect any subdomain to a file/folder
like http://SOMEFILE.domain.com to be redirected to http://domain.com/SOMEFILE.html ???
You can't, because that requires setting up a virtual host, and you don't have access to those settings. Instead, you can set up a subdomain in cPanel to map a host name to a directory. If you want this to be visible to visitors (i.e. a redirect), you can create an .htaccess file in the directory to redirect to the page on the main domain.
Last edited by misson; 11-25-2011 at 01:39 AM.
Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.Misson, not Mission.
Ok, thank you![]()