Priority to files and not to folders .htaccess

1

Hide the PHP extensions with .htaccess, I have for example the following file: "avisos.php" that when I access the browser I type: dominio.com/avisos, the problem is that I have a folder named with the same name: "warnings" and this gives me an error 403 Forbidden, it would be a lot of trouble to rename the folder or file, can I solve this with .htaccess?

    
asked by user1992275 30.07.2018 в 23:46
source

1 answer

0

This configuration can help you

Options All -Indexes -MultiViews

RewriteCond %{DOCUMENT_ROOT}/$1\.php -f [NC]
RewriteRule ^(.+?)/?$ $1.php [L]

The extract from here: link

    
answered by 31.07.2018 в 00:26