How to redirect to https on htaccess

QuestionsHow to redirect to https on htaccess
stokedJeff asked 2 years ago

How would I force https on my website the https using htaccess?

1 Answers
Best Answer
karl answered 2 years ago

you can use these htaccess rule to redirect all your URLs to https:

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]