这是要添加到 httpd.conf 的配置,它从未测试过。
<VirtualHost facebook.domain.com:443>
DocumentRoot "/var/www/html"
ServerName domain.com
ServerAlias facebook.domain.com
ServerAdmin admin
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW
:+SSLv2:+EXP:+eNULL
SSLCertificateFile "/var/www/html/server.crt"
SSLCertificateKeyFile "/var/www/html/server.key"
<FilesMatch "\.(cgi|shtml|phtml|php|php5|php4|php3?)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "path/to/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</VirtualHost>
但我想用户在浏览http://www.domain.com/index.php?op=facebook时会自动重定向到https://www.domain.com/index.php?op=facebook或https:// /facebook.domain.com/index.php?op=facebook,如何实现?
谢谢