Deactivating a page from host server [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this questionI want to deactivate a page from my hosting. like www. example.com/page5.php If i type above link in browser. It shows me 404 page or redirect me on main page etc.
How to do this please guid me. while i don't want to rename the page. Thanks
With .htaccess
RewriteRule ^page5.php$ index.php [R=404,L]
or in page5.php
header('HTTP/1.1 404 Not Found');
or
header('Location: index.php');
or
header('Refresh: 2; url=index.php');
print "You are not allowed to access this page.";
Here you go:
Header(Location: URL);
Or:
die("You cant acces this page");
Or:
header('HTTP/1.1 404 Not Found');
exit;
精彩评论