Prevent access to php pages
问题 Ok, so I have set the .htaccess like so: Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)$ index.php so as you can see I'm parsing everything to index except files because I need to "include" the php files and also displaying of images. If users will type for example www.site.com/login.php that will show the login php page. How do I prevent access to the php pages but also allow to "include" them? 回答1: Move them outside of your document root.