Apache rewrite rules and DNS settings for HTTPS sites
For a web application located at:
https://www.domain.com/
With an SSL certificate issued to “www.domain.com”,
What is are the proper rewrite rules, DNS settings, or combination of both which makes each of the below urls redirect seemlessly to https://www.domain.com/:
1. http://www.domain.com
2. http://domain.com
3. https://domain.com
The difficulty is really with #3. https://domain.com tends to cause browser security messages. How do the major HTTPS sites do this? Take Paypal.com, for instance.
As some more assistance for item 3, and maybe 2 as well, how about using Server Name Indication to use two certs on the same host. (ie: www.domain.com and domain.com) Apache’s Wiki has some info on the specifics.
–Christopher Karel
Check more discussion of this question.
Related posts:
- Apache rewrite rules behind a nginx proxy
- Apache module “mod_jk”. Setup rewrite condition for using https for specific url/context
- domain not getting resolved without www. Despite appropriate apache settings and DNS records
- Why do some rewrite rules fail while AJP is serving all of my requests to Tomcat?
- Apache server rewrite rules: how to avoid “implicitly forcing redirect (rc=302)”?
Leave a comment
Recent Posts
- What is the easiest way to upgrade my existing Perl 5.14 to Perl 5.16 on FreeBSD 9 using the ports system?
- Know if mysql has done its job
- Redirect https .com to https .co.uk without a valid SSL cert on .com without DNS change
- Why is it a bad idea to use customer email as from address
- 100% packets dropped on first RX queue on 3/5 raid6 iSCSI NAS devices using intel igb (resolved)
Tags
active-directory
amazon-ec2
apache
apache2
backup
bash
centos
cisco
command-line
debian
dns
email
exchange
firewall
iis
iis7
iptables
linux
macosx
monitoring
mysql
networking
nginx
performance
permissions
php
postfix
raid
security
sql-server
sql-server-2005
sql-server-2008
ssh
ssl
ubuntu
unix
virtualization
vpn
webserver
windows
windows-7
windows-server-2003
windows-server-2008
windows-server-2008-r2
windows-xp





