M
M
Maxim Timofeev2017-03-28 11:00:07
Apache HTTP Server
Maxim Timofeev, 2017-03-28 11:00:07

Sudden TOO_MANY_REDIRECTS and sad nic.ru?

Once upon a time there was a site that did not touch anyone, it was on nic.ru at an inexpensive tariff (hosting). Everything worked, but today TOO_MANY_REDIRECTS appeared. Of the redirects, only resolving issues with www and https. I commented out the site is resurrected.
Here is htaccess:

RewriteEngine on

#это закоментил, что бы заработало
#RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] 
#RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
#RewriteCond %{SERVER_PORT} ^80$
#RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php


Question 2:
1. Am I a krivoruk and is it better to compose htaccess differently?
2. I can not understand why this happened suddenly, and not as a result of making any changes? Did the hoster rivet symlinks or make changes to the server config? From time to time I notice such surprises on nic.ru and I'm already thinking about completely abandoning them. There is also a VDS from another company, such joys do not happen there.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2017-03-28
@BuriK666

RewriteCond %{SERVER_PORT} ^80$
change to
RewriteCond %{HTTPS} !on

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question