-->

Plesk 11 forcing redirect to non-www

2020-06-17 04:20发布

问题:

I have ordered the new dedicated server with Plesk 11 on it. Moved my websites from old server to the new one but had some issue on opening websites.

Using .htaccess, I force the client to use the website with www. Plesk is doing contrary by default: www to non-www. A redirect loop as result ...

My question: how can I disable adding Plesk these rows by default:

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

Thanks for any help!

回答1:

Found out what to do in that case:

  1. Go to subscriptions
  2. Click the domain you would like to manage
  3. Go to websites & domains
  4. At the bottom of the page, find your domain (you will see "Hosting Settings" link next to it)
  5. Click on "Hosting Settings"
  6. Select "None" in the "Preferred domain"-dropdown
  7. Save the settings by clicking "OK"

Hope it helps someone!