Access denied error 403 when not using https

Asked

Viewed 409 times

0

I created a website on ASP.NET MVC and uploaded my files to my hosting plan.

There I am entitled to a free Let’s Encrypt certificate. After activating it, an error occurred:

If I access my website like this: https://italorodrigo.com.br works normal. But if I access it like this http://italorodrigo.com.br makes a mistake 403.

Can it be something in your website code or hosting setup? Someone has been there?

  • Hi ital it may be that your httdocs server is configured for https or you have a file at the root. httacess configured to redirect this is just a hypothesis.

  • From what I’ve seen vc have an SSL certificate that same , it will always direct to https for security reasons

  • The point is, when accessing http, it gives error 403 instead of redirecting pro https

  • I got it I’m gonna see how I did here in mine !

2 answers

1

Create a file at the root of your hosting . htaccess and put this code

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://italorodrigo.com.br/$1 [R,L] 

  • the file has no name? only extension . htaccess?

  • 1

    That’s right my director !

  • I already left the file, see if you can access there http://italorodrigo.com.br I think I have cache problem with my internet provider :/

  • 1

    Tell me this site is at the root or in a folder and you’re directing:

  • is in httpdocs folder, upei the file there

  • 1

    File name has have point before so . htaccess is so in the same place as this site

  • look how I did: https://italorodrigo.com.br/1.png

  • Then puts a redirect url html type

  • <meta http-equiv="refresh" content="0;url=https://italorodrigo.com.br/">

  • Puts the site in another folder and redirects it to html

  • I’ll see if I’m right. It’s the first time I’ve stayed using PLESK and ASP

Show 6 more comments

0


Access the Plesk > Dominios > meudominio.com > Configurações de Hospedagem

Tick the box: Redirecionamento 301 SEO seguro permanente do HTTP para o HTTPS

Then go to Access the Plesk > Dominios > meudominio.com > Configurações do IIS

Unmark the box: Exigir SSL/TLS

Browser other questions tagged

You are not signed in. Login or sign up in order to post.