I want to redirect to Page not found.php page if the date is less then some date.
for example,
http://www.example.com/index.php?dt=’2011-03-11′.
this index page fetches data in db based on date for display. if the passed date is less than some date it should redirect to pagenotfound.php . how can i do this using htaccess?
Thanks.
You’ll have to test for the date, in your PHP script ; and redirect, using the
header()function :Note : before doing this test, it might be interesting to :
$_GET['dt']exists, usingisset()