htaccess remove file extension and allow folder of same name

I have a link on my site

x.icebreaker.com/products

and a file in directory

x.icebreaker.com/products/bow

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

x.icebreaker.com/products/

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 x.icebreaker.com/products it’s how to get it NOT to load x.icebreaker.com/products/


Source: .htaccess

Leave a Reply

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