1
現在、ルートドメインをサブフォルダにリダイレクトしています。しかし、私は、ajax呼び出し(www.example.com/?act=12)に使用されているクエリ文字列urlを除外したい。しかし、私はどのようにnginxでこれを行うのか分からない。Nginxクエリ文字列urlをリダイレクトから除外します
これは私の現在のnginxの設定ファイルである
server {
listen 80;
server_name example.com;
return 301 http://www.example.com$request_uri;
}
server {
listen 80;
server_name www.example.com;
root /var/www/example.com/public;
index index.php index.html;
location =/{
return 301 http://www.example.com/it/;
}
location/{
proxy_pass http://localhost:8080;
include /etc/nginx/proxy_params;
}
location ~* \.(js|css|jpg|jpeg|gif|png|svg|ico|pdf|html|htm)$ {
expires 30d;
}
location ~ /\.ht {
deny all;
}
}
すべてのヘルプは理解されるであろう。
ありがとう、これは完全に機能しました。 – tcherokee