0
我一直在嘗試在過去的4個小時內執行此操作,並且無處不在搜索。如果你能用nginx重寫規則來幫助我,那將是非常棒的。幫助重定向nginx中的特定頁面
我想暫時將hxxp:// siteA/[dir]重定向到hxxp:// siteB/[dir],除了hxxp:// siteA /?page = 4我想重定向到hxxp:/ ?/站點B /頁= 343
這裏有我有
server {
listen 80;
server_name siteA;
rewrite ^/?page=4$ http://siteB/?page=343 redirect;
rewrite ^/(.*)$ http://siteB/$1 redirect;
}
的規則,但它似乎重定向hxxp://站點A /頁= 4到hxxp://站點B /頁= 4從而忽略了第一條規則。
我已將http更改爲hxxp,因爲我不允許在此處發佈鏈接。