Skip to content

Commit

Permalink
Merge pull request codeigniter4#6991 from datamweb/fix-empty-paths-se…
Browse files Browse the repository at this point in the history
…rver

fix: empty paths for `rewrite.php`
  • Loading branch information
kenjis authored Dec 20, 2022
2 parents a9ecb57 + c5b4dfa commit 513dcd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion system/Commands/Server/rewrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
return;
}

$uri = urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
$uri = urldecode(
parse_url('https://codeigniter.com' . $_SERVER['REQUEST_URI'], PHP_URL_PATH) ?? ''
);

// All request handle by index.php file.
$_SERVER['SCRIPT_NAME'] = '/index.php';
Expand Down

0 comments on commit 513dcd6

Please sign in to comment.