Http https www na non-www


#1

Snazim sa o to ,aby mi aj http aj https presmerovalo na https://stranka.sk/ ale pri https mi to nefunguje.
Viete niekto poradit ?

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

#2

Pokial nie si za varnishom alebo na nejakom divnom hostingu tak by malo stacit odkomentovat to co poskytuje core.


#3

Podmienku RewriteCond %{HTTPS} !on

nahrad tymto:

RewriteCond %{HTTP:X-Forwarded-Proto} !https


#4

toto ale pridava iba Varnish, ked ti request iba prechadza cez apache, tak tam taka hlavicka nie je.


#5

To je skor otazka load balance…kludne to bude robit aj nginx…