I want to do this: block whole site (say abc.com) but allow only few page like abc.com/gamma and abc.com/alfa.
Do it via .htaccess
, as @Droid said. All you have to do is to replace file.php
with the unique file you want to allow and add more of them if you want so.
Order deny,allow
Deny from all
<Files "file.php">
Allow from all
</Files>