php_admin_value engine off <FilesMatch "\.php$"> Deny from All </FilesMatch> <Location /index.php> Allow From All php_admin_value engine on </Location> <Location /sample/> Allow From All php_admin_value engine on </Location>This assume there is catch all to index.ph somewhere (.htaccess or vhost).