Mod rewrite mod_重写外部链接问题(wordpress)

Mod rewrite mod_重写外部链接问题(wordpress),mod-rewrite,redirect,url-rewriting,external,Mod Rewrite,Redirect,Url Rewriting,External,我有一个redirect.php和一个链接,但它在WORDPRESS中不起作用 我希望当我在我的网站上点击“hello”链接时,它会转到redirect.php,用户会看到微调器5秒钟,然后用户会从我的网站退出到hello.com 看起来mod_rewrite有些问题我无法解决 我真的非常感谢您提供非常详细的答案。我年纪很小 这就是我所拥有的 1.-我的主页中有一个外部链接: <a href="http://redirect.php?link=hello.com">Hello<

我有一个redirect.php和一个链接,但它在WORDPRESS中不起作用

我希望当我在我的网站上点击“hello”链接时,它会转到redirect.php,用户会看到微调器5秒钟,然后用户会从我的网站退出到hello.com

看起来mod_rewrite有些问题我无法解决

我真的非常感谢您提供非常详细的答案。我年纪很小

这就是我所拥有的

1.-我的主页中有一个外部链接:

<a href="http://redirect.php?link=hello.com">Hello</a>

2.-在redirect.php中,我有:

<html>
<head>
    ...
    <meta http-equiv="refresh" content="5;url=<?php echo $_GET['link'];?>" />
    ...
</head>
<body>
    <h1>You are leaving my site!</h1>
    <img src="/images/spinner.gif" alt="spinner" />
</body>
</html>

...
链接

如果您的网站根目录中有redirect.php文件。并将meta标记更改为:

<meta http-equiv="refresh" content="5;url=<?php echo htmlentities($_GET['link'], ENT_QUOTES,);?>" />

<meta http-equiv="refresh" content="5;url=<?php echo htmlentities($_GET['link'], ENT_QUOTES,);?>" />