0

I want to turn ssl off in a virtual directory - cron
some urls that need to run via http are for example /cron/one , /cron/two or /cron/three

I'm using this rewrite to force ssl

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

some examples, here should ssl be turned off:

/cron/one
/cron/two
/cron/three

some help?

4

2 に答える 2

0

申し訳ありませんが、特定の uri に対して SSL を無効にすることはできません。これは鶏が先か卵が先かの問題です。クライアントが要求された URI を含むサーバーに GET / POST HTTP メソッド呼び出しを送信するとき、チャネルは既に暗号化されています。SSLEngineディレクティブを使用して、仮想ホストごとに SSL を有効または無効にすることができます。

/cron/ URI を処理する 127.0.0.1 でリッスンするプレーンな HTTP で専用の仮想ホストを作成するか、crontab から HTTPS 対応の CLI HTTP クライアントを使用することができます。

于 2012-05-25T23:48:56.027 に答える
0

SSL VH 内:

Redirect /cron/one http://your.domain/cron/one
Redirect /cron/two http://your.domain/cron/two
Redirect /cron/three http://your.domain/cron/three

これらの URL を NON-SSL VH にリダイレクトします。

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ! /cron/one
RewriteCond %{REQUEST_URI} ! /cron/two
RewriteCond %{REQUEST_URI} ! /cron/three
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
于 2012-05-26T13:46:50.173 に答える