• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

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