point domains to subdirectories

jackc

Verified User
Joined
Jan 19, 2007
Messages
336
i think this feature is very useful.
lots clients ask how to do that, all I can tell them now is to create a new domain or use .htaccess.
the .htaccess method doesn't work very well.
some clients' program need to change alots if put the files in a new domain.
cpanel does have this feature, so I think DA should have it too!
it is useful in a lot of times.
 
nope, that's still redirect, which is a totally different thing.
what I like is similar to domain alias, but to subdirectories.
 
yah, i know that method, but not really the same, it does have some flaw. so the best is still do it by apache configuration.
 
so the best is still do it by apache configuration.

If you have access to the apache configuration then do it that way. But you don't want the average user to be able to do this as this is a security risk.
 
why would it be a security risk?
it's basically the same as use subdomain management, but have the ability to point top-level domains or different subdomain names to the a directory instead of just pointing the same subdomain name.
 
You don't want users to be able to arbitrarily change the DocumentRoot.
 
well, isn't when you add a subdomain in subdomain managerment, the documentroot of that subdomain is changed to that subdirectory?

subdir.example.com -> domains/example.com/public_html/subdir/

i don't see any difference to do that with a different domain name.

othersub.example.com -> domains/example.com/public_html/subdir/
otherexample.com -> domains/example.com/public_html/subdir/

ofcouse it will require a little checking to make sure the subdir is within the users' domain, and no other people is using that domain, stuff like that, but shouldn't be too difficult.

however i'm not 100% sure this would affect DA's structure or not, i have seen lots control panels able to let user do this, like cpanel, and lots clients want to have this feature, so I'm just asking if it's doable in DA, if it is I'd like to have it. if it will break DA or require too much change, then just forget about it.
 
Last edited:
Back
Top