bramus / router

A lightweight and simple object oriented PHP Router

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

$route->set404 = redirect to ?uri= if folder exist

hroma opened this issue · comments

commented

Hi,
I want to return a 404 error page for all request starting with WEB_INF like http: //domain.com/WEB-INF
Is it normal behavior that url is redirected to http: //domain.com/WEB-INF?uri=WEB-INF.
Please note that WEB-INF folder really exist on my serverRoot and below rule works fine if folder doesn't exist...

$router->set404('/WEB_INF(/.*)?', function () {
    require '/404.php';
});

Thanks