Reputation: 940
In AWS ELB terminates SSL to someone who explicitly types ‘https://example.com‘ but the connection of the poor bloke who types ‘http://example.com‘ is left unsecured.
How to redirect to https://example.com to https://www.example.com?
Upvotes: 0
Views: 47
Reputation: 940
I have done mistake while generating SSL certificate on AWS Certificate Manager.
Now I have added domain names with example.com,*example.com, and www.example.com
Upvotes: 1
Reputation: 4094
See https://github.com/sovereign/sovereign/issues/524 Put this in the configuration:
<VirtualHost *:80>
ServerName example.com
RedirectMatch permanent "^(.*)" "https://www.example.com$1"
</VirtualHost>
Upvotes: 0