1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

How DO I Set Root Directory For Subdomain?

Discussion in 'Plesk for Linux - 8.x and Older' started by Superman859, Sep 18, 2007.

  1. Superman859

    Superman859 Guest

    0
     
    How Do I Mod_Rewrite For Subdomain?

    I'm switching servers. The old server used a different file structure and had a generic control panel. The structure was something like

    public_html/folders

    where folders could be whatever. For a subdomain, you could create a subdomain and then specify the root directory. For example, I have www.site.com/phpBB2 as a directory for forums. I created forums.site.com and set the root as public_html/phpBB2.

    Now, I'm moving the site to Plesk. My code is all written for the old file structure. With Plesk, subdomains by default end up in subdomains/subname/httpdocs.

    If I were to take all the files from phpBB2 and simply put them in subdomains/forums/httpdocs, I'd have some issues with my php code.

    What I would like to do is still use forums.site.com, but get that to point to httpdocs/phpBB2 rather than subdomains/forums/httpdocs. If I can do that, then I should be able to transfer everything with ease and not worry about breaking the code.

    Any ideas?

    Edit: I've been searching around and it seems like the best option is with a mod_rewrite. I'm not too familiar with those, so it's difficult to write one on my own from looking at other examples.

    An example for one subdomain (say forums.site.com pointing to httpdocs/phpBB2 ) should be enough to allow me to create my own vhost.conf file for the other subdomains. By the way, I can just create vhost.conf if it's not present, right? All I have in conf/ is httpd.include which I'm not supposed to edit.
     
Loading...