将用户重定向到index.php [英] Redirect user to index.php
问题描述
我有一个site.php页面,其中包含以下
标题(位置:http://www.external site.co.za);
? >
在我的index.php页面中
i有一个链接选择
如果用户点击链接,他将被导向fancybox内的site.php,他不会知道外观url和他不必离开我的页面。
但是如果用户输入http://www.mysitename/site.php它会打开外部网站。我无法保护site.php页面,因为您无需登录。这只是他需要的信息然后回到我身边。
如果用户这样做,它必须将site.php重定向到我的index.php
谢谢
或通过JavaScript
window.location = 'http://www.yoursite.com/whereyouwanttogo.php';
或用PHP
标题(位置:www。 yoursite.com/whereyouwanttogo.php)
i have an site.php page with the following
header (location: "http://www.external site.co.za");
?>
In my index.php page
i have a link Selection
If user click on link he wil be directed to site.php within fancybox and he wont know the exterior url and he wont have to leave my page.
But if user types in http://www.mysitename/site.php it open the external site. I cannot protect the site.php page because you dont have to log in . It is just an information he needs and then back to my side.
Is it possible that if a user does this it must redirect site.php to my index.php
Thank you
Or by JavaScript
window.location='http://www.yoursite.com/whereyouwanttogo.php';
Or in PHP
header("Location: www.yoursite.com/whereyouwanttogo.php")
这篇关于将用户重定向到index.php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!