Skip to content

Commit

Permalink
Fixed #9
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Nessier committed Feb 21, 2023
1 parent cf7db84 commit 13ec8bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@

require_once 'options.php';

$requestUri = str_replace($relativeUri, '', $_SERVER['REQUEST_URI']);
$requestUri = $_SERVER['REQUEST_URI'];
$position = strpos($requestUri, $relativeUri);
if ($position === 0) {
$requestUri = substr($requestUri, strlen($relativeUri));
}

$requestUriPath = parse_url($requestUri, PHP_URL_PATH);

$code = 404;
Expand Down

0 comments on commit 13ec8bd

Please sign in to comment.