Oto zawartość pliku .htaccess
Kod
RewriteEngine On
RewriteCond %{HTTP} off [OR]
RewriteCond %{HTTP} !=on
RewriteRule ^(.*)$ https://xxx.pl/$1 [L,R=301]
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://xxx.pl/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://xxx.pl/$1 [R=301,L]
RewriteCond %{HTTP} off [OR]
RewriteCond %{HTTP} !=on
RewriteRule ^(.*)$ https://xxx.pl/$1 [L,R=301]
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://xxx.pl/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://xxx.pl/$1 [R=301,L]
Ogólnie rzecz biorąc potrzebuje zrobić przekierowania z:
http://xxx.pl
http://www.xxx.pl
https://www.xxx.pl
...adres.pl/index.php(html)
na https://xxx.pl
Dodam jeszcze że chciałbym aby przekierowania działały również na podstrony np z http://xxx.pl/xxx/ na https://xxx.pl/xxx/