How to handle requests to the folder names?

There is a folder with the name of the handler
How to handle the request localhost/handlerto not open the folder, and opened the indicated page, naaprimer 404.php?
April 7th 20 at 10:49
1 answer
April 7th 20 at 10:51
# Installation directory
RewriteBase /
# Protect hidden files from being viewed
<Files .*>
 Require all denied
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
# godaddy hack no input file specified
RewriteRule .* index.php [PT,QSA,L]

translation of comments he will understand

Find more questions by tags htaccess