P
P
Philipp R.2018-05-23 10:17:51
1C-Bitrix
Philipp R., 2018-05-23 10:17:51

Make a redirect from https://mysite.ru/ to https://www.mysite.ru/ 1C?

Hello.
How can I redirect from https://mysite.ru/ to https://www.mysite.ru/.
The site works on https://www.mysite.ru/, but when you try to go to the site on https://mysite.ru/ it gives an error,
403 Forbidden
Access denied.
In .htaccess

RewriteCond %{SERVER_PORT} !^443$ 
RewriteRule ^(.*)$ https://www.mysite.ru/$1 [R=301,L]

But when switching to kraski.ru, everything works. It is necessary to make sure that from https://mysite.ru/ to https://www.mysite.ru/ there is a redirect.
Help me please)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2018-05-23
@RFV_online

RewriteCond %{HTTP_HOST} !^www\.(.*) [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

Everything is written in detail
here https://google.gik-team.com/?q=%D1%80%D0%B5%D0%B4%...
Click on any link

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question