My requirement looks Simple, But Googling Did not help me yet.
my query is
i want to Throw a 404 page to a user(Not Re-Direct to another folder or file), who is trying to Access *.php files in my website
ex: when a client asks for www.example.com/home/ i want to show the content , but when user says
www.example.com/home/index.php i want to show a 404 page.
i tried different methods, nothing worked for me, one of which tried is shown below
<Directory "C:/xampp/htdocs/*"> <FilesMatch "^\.php"> Order Deny,Allow Deny from all ErrorDocument 403 /test/404/ ErrorDocument 404 /test/404/ </FilesMatch> </Directory>
Thanks in Advance