Hey. I need a header menu something like this here: Click The menu to be what I want and to redirect the other page to another site. How do I do it ?
You can probably try this <?php if (isset($_GET['u']) && empty($_SERVER['HTTP_REFERER'])) { // display some message echo ("You are not permitted to view this page"); // OR // redirect this visitor to your homepage or some other page header ("Location:http://mysite.com"); } ?> PHP: Basically this code checks if the visitor came to this internal page directly (hotlinking from other sites etc.) and either displays an error message or redirects to your site's home page. P.S.: a) You must use only 1 (either the echo or header redirect) for this code to work b) Some browsers may just not send the referrer value. Hence this code is not 100% reliable..
Thanks, but that's not what I really need. I just need the header to be something that I want and the other page to be a web address. Just like in my example.