In my htaccess
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] If you follow the link http://site.ru/link/script.php then it will transfer to https://site.ru/link/ and I need to redirect with saving the full URL in my example this is https://site.ru /link/script.php
How to write a condition in htaccess