• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

How DO I Set Root Directory For Subdomain?

S

Superman859

Guest
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.
 
Back
Top