Acest htaccess redirect din http pe https functioneaza fie ca sunteti pe apache fie apache + nginx.
Adaugati codul de mai jos primul in fisierul htaccess.
Este codul care-l folosesc si la roforum sa redirectionez toate link-urile spre https.
Adaugati codul de mai jos primul in fisierul htaccess.
Cod:
RewriteEngine On
### WWW & HTTPS
# ensure www.
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# ensure https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
### WWW & HTTPS
Este codul care-l folosesc si la roforum sa redirectionez toate link-urile spre https.