Forum Moderators: phranque
root Directory Tree:
Folders - look like as
------------------------------------
main - main domain as: www.example.com (i don't want www.example.com/main or main.example.com)
sub1 - subdomain as: sub1.example.com
sub2 - subdomain as: sub2.example.com
forum - subdomain as: forum.example.com
beta - subdomain as: beta.example.com
.htacces - apache file
Thank you so much, i spend too much time on it without success or relevant result.
of course i need code what work with folders in subdomains: "sub1.example.com/some_folder", one time i get it but without these folders...
Note that you will be much happier in the long run if you put all subdomain-subdirectories in a separate subdirectory. This makes for easier maintenance, fewer restrictions on root directory folder and subdomain naming, and much more efficient rule processing.
In other words, put all "subdomain-subdirectories" into a directory named something like "/subs" -- Use /subs/sub1, /subs/sub2, /subs/forum, /subs/beta. In this way, your rule(s) need only test for "/subs/" to be sure that the request has not already been rewritten, making loop prevention much easier, and avoiding most future restrictions on the names of your subdomains.
Jim