apache 判斷式 Rewrite 應該怎麼寫 - Linux

By Selena
at 2014-09-16T00:05
at 2014-09-16T00:05
Table of Contents
原本有幾有好幾個"無條件" 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
}
這應該怎麼寫? 謝謝!
--
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
}
這應該怎麼寫? 謝謝!
--
Tags:
Linux
All Comments

By James
at 2014-09-18T16:34
at 2014-09-18T16:34
Related Posts
PTT網頁版在firefox的顯示

By Mia
at 2014-09-14T23:14
at 2014-09-14T23:14
Fedora更新

By Hardy
at 2014-09-14T17:33
at 2014-09-14T17:33
rsync可以顯示"實際會copy"的檔案嗎?

By Genevieve
at 2014-09-14T13:36
at 2014-09-14T13:36
vim 呼叫 bash command

By Victoria
at 2014-09-13T20:13
at 2014-09-13T20:13
從win7灌成純ubuntu? (掛載失敗?)

By Oliver
at 2014-09-13T20:12
at 2014-09-13T20:12