mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 08:47:52 +00:00
[BUGFIX] Fixed router for controller and ressources not matching /something?
This commit is contained in:
@@ -16,9 +16,8 @@ class RouterController extends RouterEntry {
|
||||
}
|
||||
|
||||
public function matchRoute($requestMethod, $url) {
|
||||
|
||||
$url = parse_url($url);
|
||||
$url = $url['path'];
|
||||
$url = rtrim($url['path'], '/') . '/';
|
||||
|
||||
if(strtolower($url) == strtolower($this->url) || stripos($url, $this->url) === 0) {
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class RouterRessource extends RouterEntry {
|
||||
|
||||
public function matchRoute($requestMethod, $url) {
|
||||
$url = parse_url($url);
|
||||
$url = $url['path'];
|
||||
$url = rtrim($url['path'], '/') . '/';
|
||||
|
||||
if(strtolower($url) == strtolower($this->url) || stripos($url, $this->url) === 0) {
|
||||
$url = rtrim($url, '/');
|
||||
|
||||
Reference in New Issue
Block a user