[FIXED] htaccess being ignored if file name is in URL

I’ve looked around on Google and cannot find anything that may help with my issue (maybe I’m not looking for the correct thing).

I’m not sure if this is a feature that I don’t know how to turn off or if it is a bug of some sort but it is causing me trouble either way. The problem that I am having is when you request a page eg (http://example.com/foo/abc/) it will return the foo.php document. Unfortunately this conflicts with my htaccess file that I have which would direct the same domain to foo.php?example=abc . No matter what is typed after ‘foo’ it will completely bypass any htaccess code including code such as what I have that adds a trailing slash to any page that doesn’t have one. I have tried reinstalling Virtualmin and recreating the virtual server, the problem persists on entirely blank servers with just a single php file.

Any help with this would be very much appreciated.

Software versions; Virtualmin: 6.06 - Webmin: 1.900 - Usermin: 1.7.5.1 - OS: CentOS Linux 7.6.1810