I
I
Ivan2019-01-31 12:28:58
htaccess
Ivan, 2019-01-31 12:28:58

Redirect without www to www with https?

We recently switched to https and there was such a problem:
There is a site.ru site that normally redirects to https://www.site.ru
But somewhere on the Internet the site.ru address is indicated and here the site is already not available, also inaccessible if you type it manually https://site.ru
Another fact is that not all browsers and computers open the site.
For example, I have norms in chrome, but in the explorer it doesn’t want to open at all.

htaccess now:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^datum-eco\.ru
RewriteRule (.*) https://www.datum-eco.ru/$1 [R=301,L]

RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

#Removes index.html
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://www.datum-eco.ru/$1 [R=301,L]


Initially, another person was engaged in the site, and in this state he came to me, I can’t figure it out.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2019-01-31
@shambler81

You have a record www and without it show different ip.
Moreover, the problem is with the domain without vvv

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question