• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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