HTTP to HTTPS via mod_rewrite
Mar 25, 2022

HTTP to HTTPS via mod_rewrite

To redirect a website from http -> https I utilized mod_rewrite. And created a .htaccess file with the following contents.$ cat .htaccessOptions FollowSymLinksRewriteEngine OnRewriteCond %{SERVER_PORT} !^443$RewriteRule ^(.*) https://your_server.com/$1This can be useful if you need to ensure all access to your site, is done via HTTPS.

Related posts

Browse more
We haven't published any posts