リダイレクトを使用してnginx設定を作成する必要があります。ここに私のconfがあります。
server {
listen 8080;
server_name test.example.org;
index index.php index.html;
return 301 $scheme://test.example.org/dashboard;
location /dashboard {
alias /path/to/files;
index index.php index.html;
}
}
test.example.orgをtest.example.org/dashboardにリダイレクトする必要があり、test.example.orgに移動すると、ブラウザに「リダイレクトが多すぎます」というエラーが表示されます。
ベストアンサー1
入れてみよう
return 301 $scheme://test.example.org/dashboard;
~へ
location / {
}