When i type localhost/myproject/about/garbage/blababla/about/qwertyu/adsfgad/about
It WORKS (beacause my code only reads the last entry (about)), but... previous entries remain in the url (about/garbage/blababla/about/qwertyu/adsfgad)
When i try this on wordpress, the framework also pick the last entry, but rewrite url removing previous garbage
How to erase previous user entries garbages?
My Route code
define('ROUTE', basename(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)));
define('ROOT', basename(dirname(__DIR__)));
switch (ROUTE)
{
case ROOT:
require_once __DIR__.'/view/login.php';
break;
case 'about':
require_once __DIR__.'/view/about.php';
break;
default:
http_response_code(404);
break;
};
My .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>