【发布时间】:2014-01-29 14:05:22
【问题描述】:
我需要这样做:当有人键入https://mydom1.re.it/sso_mio/<whatever> 时,我需要重定向到https://mydom2.re.it/sso_mio/<whatever>。所以,在 ssl.conf 文件中,在 mydom1 中。 re.it 部分,我有以下内容:
<VirtualHost 192.xxx.yyy.zzz:443>
ServerName mydom1.re.it
SSLEngine on
SSLProxyEngine on
RewriteEngine on
SSLCertificateKeyFile ...
SSLCertificateFile ...
SSLCertificateChainFile ...
SSLSessionCacheTimeout 600
RewriteRule ^(sso_mio.*) https://mydom2.re.it [R=301,L]
ProxyPass / http://mydom1.re.it/
ProxyPassReverse / http://mydom1.re.it/
ErrorLog "|/usr/sbin/rotatelogs /var/log/httpd/mydom1/mydom1_ssl_error_log 86400"
CustomLog "|/usr/sbin/rotatelogs /var/log/httpd/mydom1/mydom1_ssl_access_log 86400" combined
</VirtualHost>
但它不起作用,它不做重定向。请告诉我为什么?
这个测试员http://htaccess.madewithlove.be/说重定向没问题。
【问题讨论】:
-
请正确格式化文本。很难按原样阅读。
-
“httpd.conf”中你的服务器名中的空格吗?
-
没有空间,我不能发布超过 2 个链接/网址,所以我不得不添加一个空间。抱歉 :( 没有空间,现在我编辑了帖子,所以应该看起来不错 ;)
标签: apache http mod-rewrite redirect https