Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


Przekierowanie na HTTPS z WWW (301)

Code Block
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.nazwadomeny.pl [NC]
RewriteRule ^(.*)$ https://www.nazwadomeny.pl%{REQUEST_URI} [R=301,L]

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


Przekierowanie na HTTPS (302)

Code Block
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI}

...