How to exclude or hide the subfolder name in the URL when you open a webpage using PHP?

I have a website that has an example URL like localhost/projects/mysite/app/index.php, my objective is to exclude the folder name "app" when I open it, and instead, it shows only localhost/projects/mysite/index.php. What is the best way to exclude or hide the sub-folders and show directly the webpage in the address bar/URL?

I tried to remove .php in the URL and it succeed. However, I can't find a way to exclude the folder name. Also, here are the steps I have done so far:

enter image description here



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation