• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    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.

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