Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Ifを使用してNginx構成ファイルの変数から値を抽出する代替手段はありますか?
いえ
if ($http_referer ~* (?<=url=)([\w-.]*)(?=/) ){ set $proxied $1; rewrite (?<=/)(.+\.(css|jpg|png|gif|js)) http://$proxied/$1 redirect; }
ありがとう
はい。http://nginx.org/r/map
map $http_referer $proxied { default example.com; "~*(?<=url=)(?<p>[\w-.]*)(?=/)" $p; }