Base Path Middleware for PHP
This middleware just removes a prefix from the request uri.
This middleware can be installed with composer.
$ composer require los/basepath
Just add the middleware as one of the first in your application.
Every request with
/site prefix will be replaced:
/site => / /site/blog => /blog /site/contact-us => /contact-us
If you are using expressive-skeleton, you can copy
config/autoload/los-basepath.global.php and modify configuration as your needs.