Jump to content
xisto Community
Takkun

Subdomain Folders How can I specify a new folder for my subDomain?

Recommended Posts

Edit: This issue has been solved. See last post.

 

When I set up a subDomain, it automatically assigns a folder to it.

sub.webiste.org --> webiste.org/sub

This is fine for only basic configurations. Instead, I need to specify the path, like this:

sub.webiste.org --> webiste.org/www/sub/zzz

I can do this easily with apache (my localhost test-rig; adding a virtualhost) and I thought I could do this in CPanel by specifying the path for a subdomain. However, this CPanel setup pre-defines a folder and I dont know how to change it! I tried a subDomain redirect but it just removes the -short- subDomain url with the real -longer- one.

 

Any ideas, questions, thoughts?

Edited by Takkun (see edit history)

Share this post


Link to post
Share on other sites

You're only refering to creating ONLY the sub-domain (and not add-on domain).

 

You can create website.org/sub and place index.php in that folder

<?phpheader("Location: website.org/;;exit;?>
And create a normal index file under folder sub/zzz and starting building your site.

This is the simplest solution.

 

Another way of doing things is to use Site Management Tools / Manage Redirects to divert traffic going to set location. This is the best way of doing your redirect.

Share this post


Link to post
Share on other sites

Thanks for the suggestions. Yes you are correct: I am taking about a sub-domain and not an add-on domain. Hmm, I never thought of that php-method; but I dont want any re-direction to other urls (I explain this in the last paragraph of this post).

 

After a bit of research last night, I discovered what I'm looking for: Symbolic Links link1, link2 (I'll try it in SSH, if I can "someday" connect to the server!).

 

My Situation:

Lets say I have three files:

site.domain.org/index.php

site.domain.org/forum/phpbb2/index.php

site.domain.org/forum/phpbb2/login.php

...and 2 subDomains:

forum.domain.org

site.domain.org

Naturally, my forum's subDomain needs to act as if the phpbb2 directory is it's root directory. When I click on a link that says "forum.domain.org/login.php", then that?s the exact URL I want to see in my Address Bar (after the page loads). Furthermore, this needs to work for all files in the phpbb2 folder (all pages, images, etc...). This would be a very SIMPLE task if I could just specify the root directory for any given subDomain. Well, maybe I'll just have to ask support to do it for me. :blink:

Share this post


Link to post
Share on other sites
Solved! I emailed tech support (technical@Xisto - Web Hosting.com) and asked if they could change my subDomains root folder. Apparently it's quite a simple procedure for them. Within 12 hours later, it was done and works perfectly! The new root for the subDomain also shows up in CPanel/SubDomains page. Kudos to Stanley in tech support!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.