在mydomain.com,我现在把所有的我的Apache conf文件中:阿帕奇重写:始终使用HTTPS(如何添加一个例外)
/etc/httpd/conf.d/
在那里我有一个名为alwaysHttps.conf文件包含:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
我有一堆virtualhosts,并在网站上一个域:myotherdomain.com我想关闭自动重定向。是否有可能设置重定向到https的例外,而不是必须摆脱全局alwaysHttps.conf?
<VirtualHost *:80>
DocumentRoot /home/webadmin/myotherdomain.com/html
ServerName myotherdomain.com
CustomLog "/home/webadmin/myotherdomain.com/access_log" "combined"
ErrorLog "/home/webadmin/myotherdomain.com/error_log"
<Directory /home/webadmin/myotherdomain.com/html>
Options Includes FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
行 - 完美!谢谢... 解决了重定向问题,但现在我得到404s。我的域名conf文件是: 如果我放弃修复并将80:443页面加载。但现在的情况是,他们没有。任何快速的想法? – NinjaCat 2010-07-14 16:19:27
你在你的配置中有没有'NameVirtualHost *:80'和'Listen 80'? – Wrikken 2010-07-14 16:29:38