Page is a not externally linkable
designaweb - 10:24 am on Jul 28, 2009 (gmt 0)
Are you sure? I also use this: if ($redirect_url) { I just checked, and the headers returned by that script are: HTTP/1.1 301 Moved Permanently So the header("HTTP/1.1 301 Moved Permanently"); does seem to be working in that case, why wouldn't it in the 404 example? Your solution is more elegant and faster, but I am asking this to learn...
That doesn't work here. Your location header will cause a 302 redirect sent to the client, not a 404 not found
// Redirect to stripped URL
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".$redirect_url."");
exit;
}
Date: Tue, 28 Jul 2009 10:21:02 GMT
Server: Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6.5 mod_ssl/2.2.4 OpenSSL/0.9.8e
X-Powered-By: PHP/5.2.3-1ubuntu6.5