Skip to content

Commit

Permalink
Remove oldsite when fetching $self_url
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed Sep 4, 2023
1 parent a1c3f6b commit e6c854f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ function get_self_url($strip_query = true) {
} else {
$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);

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

Expand Down

0 comments on commit e6c854f

Please sign in to comment.