mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-02-23 12:23:58 +00:00
var/www/pages/index.php : improve look of URLs
This commit is contained in:
parent
ee47caf42d
commit
03508f2470
@ -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…
x
Reference in New Issue
Block a user