以下が機能しない理由がわかりません
RewriteCond ${foobar:test:$1} ^
RewriteRule ^/?(.*)$ /check.php?url=$1 [L]
foobarはプログラム(単純なbashスクリプト)であり、その中からファイルに書き込んで入力内容を確認します。check.phpの内容を表示する単純なphpスクリプトですGET。正規表現($1)をシェルスクリプトとphpスクリプトの両方に渡すと、次のようになります。
url check.php foobar
www.example.com/index.html index.html test:
www.example.com/index.php index.php test:
www.example.com/test.html test.html test:
基本的に、パターンはRewriteRule内で認識されますが、foobarへのパラメーターは認識されません。
注:シェルスクリプトに問題はありません。代わりに私がそれをそのように呼ぶならば${foobar:test:abc123}、出力は「test:abc123」です