htaccess redirect rule от www.example.bg към example.bg

Peters-Mac-i7:DocSets peternikolow$ curl -I https://seositecheckup.com/
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 14 Jun 2017 19:53:50 GMT
Content-Type: text/html
Vary: Accept-Encoding
Set-Cookie: PHPSESSID=ldkh1adq4gnohn4uem5krlddd0; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Strict-Transport-Security: max-age=15768000
X-UA-Compatible: IE=Edge,chrome=1
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: NOSNIFF


Peters-Mac-i7:DocSets peternikolow$ curl -I http://seositecheckup.com/
HTTP/1.1 302 Found
Cache-Control: no-cache
Content-length: 0
Location: https://seositecheckup.com/
Connection: close

Пренасочи го със 301, а не със 302!

Peters-Mac-i7:DocSets peternikolow$ curl -I https://www.seositecheckup.com/
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Wed, 14 Jun 2017 19:54:58 GMT
Content-Type: text/html
Content-Length: 178
Location: http://seositecheckup.com/

Peters-Mac-i7:DocSets peternikolow$ curl -I http://www.seositecheckup.com/
HTTP/1.1 302 Found
Cache-Control: no-cache
Content-length: 0
Location: https://www.seositecheckup.com/
Connection: close

Пак го пренасочи със 301!


Peters-Mac-mini-i7:DocSets peternikolow$ curl -I https://seositecheckup.com/blah/
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Wed, 14 Jun 2017 19:55:51 GMT
Content-Type: text/html
Content-Length: 178
Location: http://seositecheckup.com/blah
Strict-Transport-Security: max-age=15768000
X-UA-Compatible: IE=Edge,chrome=1
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: NOSNIFF

Тук правиш грешка защо от HTTPS пренасочваш към HTTP? А HTTP към HTTPS и става една...
 

Горе