mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-01-19 00:57:53 +00:00
var/www/pages/index.php : improve look of URLs
This commit is contained in:
parent
ee47caf42d
commit
03508f2470
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ $command = "sh -c \"cd '$git_root' && /usr/bin/git ls-tree 'master:$file_url' >
|
|||
exec($command, $output, $retval);
|
||||
if ($retval === 0) {
|
||||
if (substr($request_url, -1) !== "/") {
|
||||
$h = "Location: https://" . $_SERVER["HTTP_HOST"] . "/" . $owner . "/" . $file_url . "/";
|
||||
$h = "Location: $request_url/";
|
||||
if ($_SERVER['QUERY_STRING'] !== "")
|
||||
$h .= "?" . $_SERVER['QUERY_STRING'];
|
||||
header($h);
|
||||
|
|
Loading…
Reference in a new issue