K
K
kimqar_ver2020-08-25 19:37:06
htaccess
kimqar_ver, 2020-08-25 19:37:06

Is the http -> https redirect not working correctly?

I want to set up a rediket from http to https. I write the following in the .htaccess file:

RewriteCond %{HTTP:HTTPS} !=on [NC]
RewriteRule ^(.*)$ portal.ru$1 [R=301,L]

Instead of redirecting to an https redirect, it redirects like this: www.portal.ru/portal.ru
What could be wrong? Worth ModX, Sweb hosting

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2020-08-25
@kimqar_ver

RewriteCond %{HTTP:HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://portal.ru/$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question