My code is below:
- Code: Select all
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
$URL = curPageURL();
$biopage = '/firm-overview/meet-our-team/?id=18';
And the if statement:
- Code: Select all
<?php if(strpos($URL,$biopage) !== false) { ?>
<meta http-equiv="REFRESH" content="0; url=http://www.domain.com/new-bio-page">
<?php } ?>
Is there a better way to do this?

