X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fp.php;h=8da044e9323916e742b2b1bb24404fefe854acdf;hb=7c9a0ec4594fa6d45cc615f8bde914bcc131226d;hp=899b51116dacb43aaf74ab47a37b8f4b9429e12e;hpb=cb3704ab436c8e3d0b43e101e54465d9ff3f5a44;p=friendica.git diff --git a/mod/p.php b/mod/p.php index 899b51116d..8da044e932 100644 --- a/mod/p.php +++ b/mod/p.php @@ -31,11 +31,13 @@ function p_init($a){ $parts = parse_url($r[0]["author-link"]); $host = $parts["scheme"]."://".$parts["host"]; - $location = $host."/p/".urlencode($guid).".xml"; + if (normalise_link($host) != normalise_link(App::get_baseurl())) { + $location = $host."/p/".urlencode($guid).".xml"; - header("HTTP/1.1 301 Moved Permanently"); - header("Location:".$location); - killme(); + header("HTTP/1.1 301 Moved Permanently"); + header("Location:".$location); + killme(); + } } header($_SERVER["SERVER_PROTOCOL"].' 404 '.t('Not Found'));