Click here to Skip to main content
15,901,284 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Comments
Mohibur Rashid 24-Aug-13 21:21pm    
header("Location: www.location.com/whatever.php")

1 solution

Or by JavaScript
window.location='http://www.yoursite.com/whereyouwanttogo.php';

Or in PHP
header("Location: www.yoursite.com/whereyouwanttogo.php")
 
Share this answer
 
Comments
Killzone DeathMan 3-Sep-13 6:13am    
My 5 stars ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900