• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue redirect http to https is not working

bugzlife

New Pleskian
hi

using plesk and has an SSL certificate in a domain

if i type : https:/domainname.com or https://www.domainname.com, it secured

but i want it as type www.domainname.com should be automatically redirect to https://domainname.com

enter as below

domainname.com
www.domainname.com
http://domainname.com
http://www.domainname.com

should be redirected to when loading the 1st page
https://domainname.com


my webconfig is not working :

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="NonWwwRedirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www.domainname.com\.com$" />
</conditions>
<action type="Redirect" url="https://domainname.com/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

thanks
bugzlife
 
Back
Top