• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Sub-domain rewrites to sub-folder

bulent

Regular Pleskian
Hi,
I have personal project where I will use discourse community forum on second vps on subdomain forum.example.com
My main site example.com will be hosted on vps with plesk onyx.
Is there easy way to make some rewrite rules and make forum work on example.com/forum
 
IgorG's code sample is correct. What exactly does not work when you try this? Have you placed it into your .htaccess file of example.com before other rewrite statements? What happens in access_log and error_log files when you open your example.com website after that change? Have you considered that the code refers to example.com, but not www.example.com?
 
Last days I was busy and now had some time to check it again and it works.

At the moment when I write www.example.com/forum it redirects to forum.example.com
when I write www.example.com/forum/some-topic it redirects to forum.example.com/some-topic

But what I want the forum to be in sub-domain (it's hard to install discourse on plesk, so it's on another VM) and with rewrite rules I want to have www.example.com/forum/... URLs
Probably I did not define the question right. Maybe I should call it forwarding..

For better SEO I want all power to go to main domain.
 
For better SEO I want all power to go to main domain.
Sorry, you might consider to inform yourself, because Google for example will wheanwhile treat the subdomain as part of the main domain ( when run by the same person/company ). Just make sure to:
  • Use the same "copyrights statements" on both sites.
  • Use the same "privacy policies" on both sites.
  • When you use a "contact"/"about us" - page, make sure that they don't differ.
  • Place links at your main - domain to your subdomain and backwards as well.
  • Register not only your main - domain at the "Google Webmaster Tools", but as well the subdomain.
 
Back
Top