htaccess remove file extension and allow folder of same name

I have a link on my site

and a file in directory

I have the following .htaccess file to allow removal of file extension in browser but I can’t get the page to show up while there is a folder of the same name (it defaults to opening the folder

How do I fix this??

ErrorDocument 404 /404.php
ErrorDocument 403 /403.php

# Disable directory browsing
Options All -Indexes

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)/?$ $1.php

if it was unclear the question is not how to get the page to load it’s how to get it NOT to load

Source: .htaccess

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.