websitings Posted June 8, 2006 Share Posted June 8, 2006 Greetings,My website displays dynamic content from urls like this:[a href=\"http://www.mydomain.com/index.php?f=whatever\" target=\"_blank\"]http://www.mydomain.com/index.php?f=whatever[/a]Is it possible to modify the htaccess so that if a url does not contain ?f a header 404 message instead of a 200 success could be presented to the agent requesting the url.Thanks for any assistance Quote Link to comment Share on other sites More sharing options...
zq29 Posted June 19, 2006 Share Posted June 19, 2006 I know you can force users to a 403 (Forbidden) by using mod_rewrite in a .htaccess file. If that interests you, check the mod_rewrite section of the Apache manual, its in there somewhere. Quote Link to comment Share on other sites More sharing options...
mtbrandall Posted June 21, 2006 Share Posted June 21, 2006 try just doing it in php and adding[code]<?phpif(!isset($_GET['f'])){ //see if ?f is not set header("Location: error404.php"); //send the user to the 404 page exit(); //terminate the script}?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.