I want to block direct access to files ending with the .php
extension.
Let's say I have a page called teste.php
. If the user tries to access it by teste.php
it will receive a 404. The only way the page can be accessed would be teste
, without the .php
extension.
Would you like to do this with .HTACCESS?
EDIT 1
Folder structure:
.htaccess
index.php
contact.php
error
│ 404.php
│ 500.php
│ ops.php