Hy,
I want to redirect http request to https only when ssl is not expired and if ssl expired then keep request in http.
How can I do this?
I have api in my laravel project.
Need anymore information let me know.
RewriteEngine On
Add below code in your .htaccess file after rewrite engine on
RewriteCond %{HTTPS} != on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
You can use a cron job to auto renew the certification (in case of Let's encrypt )
Forget to use complex rule to verify the validaty of SSL certification
they are a lot of article , about configure redirection from Http tp Https