Redirect HTTP requests to HTTPS #Apache
- Add below lines in httpd.conf and save configuration
LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngine on
RewriteCond %{SERVER_PORT} =80
RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
RewriteCond %{SERVER_PORT} =80
RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
- Restart your http server
Install SSL / Self Signed certificates in server and configure application accessible via https.
Type your websitre with http protocol, that redirects to https automatically

Comments
Post a Comment
feel free to give feedback