redirect to https 26 remove www

Solutions on MaxInterview for redirect to https 26 remove www by the best coders in the world

showing results for - "redirect to https 26 remove www"
Lautaro
24 Jan 2019
1RewriteEngine On
2RewriteBase /
3RewriteCond %{HTTPS} off [OR]
4RewriteCond %{HTTP_HOST} ^www\. [NC]
5RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
6RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]