Forum Moderators: phranque

Message Too Old, No Replies

One folder for 2 or n subdomains

         

mouzaia

10:07 pm on Jan 16, 2005 (gmt 0)

10+ Year Member



Hello All,

I have searched and searched and not found.
I have a reseller account somewhere with no shell access.
If I create a sub1.domain.com (with cpanel), it does create a sub1 folder.
If I create a sub2.domain.com, it create a sub2 folder.
I would like to have these 2 sub domains pointing on an other folder, for instance a "sub" folder.
Can I do it through a .htaccess rewrite ...
Thanks for your help.

mcavic

1:38 am on Jan 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, the two subdomains probably won't have access to each other's files. You could use a symbolic link... but they might be disabled. And you'd basically need a shell to create the link anyway.

I'd ask your support people -- they can easily point them both to the same folder, if they're willing.

mcavic

1:40 am on Jan 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or, you could use .htaccess to redirect one subdomain to another. But then they would both be the same subdomain, not just the same folder. It might make a difference, depending on what you're doing with the site.

mouzaia

10:09 am on Jan 17, 2005 (gmt 0)

10+ Year Member



Thanks MCavic,

Your first message, you are right. And that is true, I could ask to the support, and they would do it easily, but I want to be as independant as possible, cause I always believe with the money they ask, they cannot spare too much of their time :-)

Your second message, right also, but then I loose the name of the url called, and I cannot get it in a $_SERVER[host_name] and manage it as I want. So I have to find an other way, but I will :-)

Thanks again.