繁体   English   中英

节点 JS res.redirect() 没有按预期工作

[英]Node JS res.redirect() not working as expected

我正在尝试使用 res.redirect() 重定向到某个外部 url,但主机名没有被替换。

喜欢我现在的url: https://example.com

想重定向到: https://example-2.com/pqr?par=123

在使用 res.redirect("https://example-2.com/pqr?par=123") 时,我被重定向到https://example.com/pqr?par=123

请分享您尝试重定向过程的完整代码。 有时它会是一个拼写错误,但您看不到它:)并尝试使用带有返回的重定向请求;

return res.redirect("https://example-2.com/pqr?par=123");

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM