• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Subdomains redirect www prefix

Luco

New Pleskian
Hey,

this is my first question in this community. We are starting to migrate our servers to Plesk and are building all necessary processes with the plesk xml api. everything works like a charme except this little problem.

If i create a subdomain via api
Code:
<subdomain>
    <add>
        <parent>domain.com</parent>
        <name>example</name>
        <property>
            <name>www_root</name>
            <value>httpdocs/web/</value>
        </property>
    </add>
</subdomain>

the vhost configuration at apache gets this part

Code:
<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{HTTP_HOST} ^subdomain.domain.com$ [NC]
        RewriteRule ^(.*)$ http://www.subdomain.domain.com$1 [L,R=301]
</IfModule>

so every subdomain is redirected to prefix www.
BUT if i create the subdomain via plesk panel, the mod_rewrite isnt created, as i want.
i also tried reconfigure-all, but this rewrite part is always active.

i have no possibility in plesk 12.0.18 to set the setting for www prefix like at normal sites.
So what can i do to prevent it and where can i change it afterwards?

thanks for every hint
kind regards
 
okay, i figured it out for myself
in global server settings, the default for "Preferred domain for websites" was set to www.domain.tld

i don´t know, why this affected subdomains, which never have www. prefix but i dont care
 
Back
Top