[英]Get redirected URL via jQuery
I want to get the redirected URL of a source. 我想获取源的重定向URL。 Example, this URL : 例如,这个URL :
https://www.novelupdates.com/extnu/2633428/
Redirects to this URL : 重定向到该URL :
http://www.tapread.com/book/index?bookId=91&chapterId=10725
So I want to get the redirected URL ( http://www.tapread.com/book/index?bookId=91&chapterId=10725
one). 因此,我想获取重定向的URL( http://www.tapread.com/book/index?bookId=91&chapterId=10725
一个)。
How can I do this via jQuery so the client ( not server) gets the redirected URL? 如何通过jQuery做到这一点,以便客户端( 而非服务器) 获取重定向的URL?
EDIT: 编辑:
So I need a function: 所以我需要一个功能:
get_redirect_url('https://www.novelupdates.com/extnu/2633428/');
Which would return: 哪个会返回:
http://www.tapread.com/book/index?bookId=91&chapterId=10725
尝试使用此代替:
window.location.href = "http://www.tapread.com/book/index?bookId=91&chapterId=10725";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.