So I have managed to get rid of the php extensions through the .htaccess handler, but the problem occurs with one particular url which shares the name with a directory.
Ie. the directory, which is in the root, is called "somename" and the page is called "somename.php", the path looks like this: www.domainame.com/somename/ for the directory, and this directory contains the following files: page1.php; page2.php etc. so the url to page1.php is www.domainame.com/somename/page1.php.
Now, the link on the menu for the page that features the urls for page1.php; page2.php; page3.php etc. is somename.php. But none of the links for page1.php; page2.php etc. are featured on the menu dropdown, instead you have to click on the "somename.php" on the menu bar and once a visitor is on the "somename.php" page they can click on a particular thumbnail to get to the page1.php, page2.php etc..
The problem occurs once I get rid of the php extension through .htaccess and when I click on the somename(ie.somename.php) on the menu bar I end up in the "somename"(www.domainame.com/somename/) directory instead of on the somename.php.
I have tried removing trailing slash at the end but the same issue persists. Ie.once I click on somename.php- it should take me to www.domainame.com/somename page but it takes me to the actual directory www.domainame.com/somename/
I have tired many different solutions bu I can't get this to work.
Please help!
Many thanks.