[问题] apache 判断式 Rewrite 应该怎么写

楼主: newversion (海纳百川)   2014-09-16 00:05:50
原本有几有好几个"无条件" rewrite
RewriteEngine On
RewriteRule Rule1
RewriteRule Rule2
RewriteRule Rule3
我现在想加上 "强制ssl"
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
也就是
if (not ssl)
{
RewriteRule => https
}
else
{
Rule1
Rule2
Rule3
}
这应该怎么写?  谢谢!
作者: danny8376 (钓到一只猴子@_@)   2014-09-16 00:33:00
把那段加在原本Rule前就解决了

Links booklink

Contact Us: admin [ a t ] ucptt.com