VIP Anyue 1139 Posted February 8, 2019 VIP Report Share Posted February 8, 2019 Здравствуйте, есть вопрос. Есть сайт на https. Нужно сделать редирект на без www. То есть на https://site.ru, как будет правильно сделать? Quote Link to post Share on other sites
AlexK 126 Posted February 8, 2019 Report Share Posted February 8, 2019 Этого достаточно: RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] p.s Запас: RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] Anyue 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.