Skip to content

Commit

Permalink
Replace oldsite in the host, not the request URI
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed Sep 4, 2023
1 parent e6c854f commit 8ca84b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,10 @@ function get_self_url($strip_query = true) {
$url = $_SERVER['REQUEST_URI'];
}
// Strip oldsite from URL, should be handled by netlify redirects
$url = str_replace('oldsite.nf-co.re', 'nf-co.re', $url);
$host = $_SERVER['HTTP_HOST'];
$host = str_replace('oldsite.nf-co.re', 'nf-co.re', $host);

return $self_url . $_SERVER['HTTP_HOST'] . $url;
return $self_url . $host . $url;
}

function generate_toc($html_string) {
Expand Down

0 comments on commit 8ca84b0

Please sign in to comment.