Submitted by moimichel on Tue, 01/03/2012 - 14:22
Hi.
I want to access my website only via https://demo.example.com and not http://demo.example.com How can I disable in virtualmin the access on port 80?
Thanks.
Status:
Active
Comments
Submitted by andreychek on Tue, 01/03/2012 - 14:59 Comment #1
One thing you could do is create a .htaccess file in your public_html folder, and put the following in it:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://demo.example.com/$1 [R,L]
That will cause any connections on port 80 to redirect to the secured port 443.