I have this file structure:
-
New
-
frontend
- index.php
-
backend
- index.php
-
If Can can I make frontend and backend folder hide like
localhost/new/frontend/index.php
Will become:
localhost/new/
I have this file structure:
New
frontend
backend
If Can can I make frontend and backend folder hide like
localhost/new/frontend/index.php
Will become:
localhost/new/
2
Answers
I’m sure that MVC will resolve your current issue. So, we should implement the website by following the MVC standard.
Some examples:
https://medium.com/@noufel.gouirhate/create-your-own-mvc-framework-in-php-af7bd1f0ca19
https://github.com/DawidYerginyan/simple-php-mvc
If you’re writing it in native PHP then you have to write your own routing system. Something like this: