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

    https://survey.webpros.com/

Quick help with subdomain please

M

manarak

Guest
Hello

mydomain.com points to httpdocs/

I got a directory httpdocs/en

I want en.mydomain.com to point to httpdocs/en/

How can I do that quick&dirty?
What file should I modify?
 
I do that like this. Create the subdomain "en" as full domain and create a vhost.conf-file. In that you can change the DocumentRoot to en, or Rewrite just the home to start in en, like this:

RewriteEngine On
RewriteRule ^/$ /en/

or to redirect to the other domain:

RewriteEngine On
RewriteRule ^/$ http://mydomain.com/en/

if you want to share the sources.
 
Thank you, but I have a 30-domains licence and I din't know that subdomains would be counted as a full domain...

I just want to do the change in DNS or anywhere, not to create a full domain for that.
 
Apache RewriteRules should also work for a subdomain. I don't really think that subdomains are counted as mains, if they are configured as a sub. I just recommended that, because then you can configure more freely. So, in your situation i would just look, if the RewriteRules are working at all. If yes, we can manage your problem. ;)
 
Back
Top