我是php的新手,我正在写一个脚本,将有url (myurl.com)用户访问重定向到myurl.com/index.html(与Wordpress &添加一个临时登陆页面),从那里,你可以访问一个不相关的链接,然后你可以选择继续访问myurl.com,像往常一样访问Wordpress网站。到目前为止,这是我得到的。
isset($_GET['home'])?$home=1:header("Location:http://myurl.com/index.html");
,当然,当你从重定向继续到myurl.com时,这仍然是重定向。任何帮助/建议都会很好!
您正在检查home
,但未设置home
,因此循环
你可以通过home
变量与URL请求-让我知道,如果这不适合你的情况:
if (!isset($_GET['home'])) {
header("Location: http://myurl.com/index.html?home=1");
} else {
// Home is already set dont redirect
}