Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plesk 11 forcing redirect to non-www

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!

like image 643
AndVla Avatar asked Jul 22 '13 08:07

AndVla


People also ask

How do I edit redirect in Plesk?

Under DNS server configuration, select the option Use our DNS settings. Under Hosting type, select the Forwarding option. In the Destination address box, type the URL address to which you want to redirect visitors. Under Forwarding type, select standard or frame forwarding.


1 Answers

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!

like image 147
AndVla Avatar answered Oct 14 '22 01:10

AndVla