Skip to content

Instantly share code, notes, and snippets.

@karamansky
Forked from akkord87/https
Last active December 26, 2022 13:22
Show Gist options
  • Save karamansky/76aaa3b3fec196aeff692e237c127634 to your computer and use it in GitHub Desktop.
Save karamansky/76aaa3b3fec196aeff692e237c127634 to your computer and use it in GitHub Desktop.
HTACCESS: 301 редирект со всех http-адресов страниц на соответствующие новые адреса с https
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://site.ru/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment