• 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

Resolved force redirect from http to https

bugzlife

New Pleskian

hi

need your help, try these force redirect using webconfig end up page has a redirect loop

success get the redirect but still page has a redirect loop, how to solve this problem
<system.webServer>
<rewrite>
<rules>
<rule name="Force HTTPS" enabled="true">
<match url="(.*)" ignoreCase="false"/>
<conditions>
<add input="{HTTPS}" pattern="off"/>
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>

thanks
bugzlife
 
Hi Bugzlife,

I have two apps published with asp.net core in plesk, and not add nothing in web.config, only configure this:

Redirect from http to https, and works fine for my two domains.
1597506261470.png


Have a nice day
 
hi jeffernando

thanks for your replied

i did try it but still page has redirect loop

i'm unsure if the webconfig is correct or not giving me the same results page has redirect loop

thanks
 
hi

i used this code :

<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Force HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

as a result error : page has a redirect loop

sucuri.JPG

please help me, thanks
 
Hi buglife, i hope you are well.

you have a plesk panel? I look at the image and I don't recognize this panel.

does this happen on all pages or only at the home page?

I need a little more information to help you.

have a nice day.
Best reggards,
 
hi jeff

thanks for your prompt replied, appreciated

i'm fine as usual, hope you are fine as well

i'm using Sucuri Security
to check the website

yes i have a plesk panel, did try set it the redirect from plesk end up redirect loop and it happened all the pages

if i type ABC Home Page - ABC.com, ABC Home Page - ABC.com : it secured shown locked icon
type ABC Home Page - ABC.com, ABC Home Page - ABC.com : it unsecured shown no locked icon
type abc.com, www.abc.com : it unsecured shown no locked icon

that's the reason why the support of plesk asked me to create force redirect using webconfig to get http redirects https


thanks
bugzlife
 
can anybody help me

everytime i use sample codes and try, still the same result redirect loop

thanks
bugzlife
 
Back
Top