Google's 302 Redirect Problem
Posted: Thu May 19, 2005 6:40 pm
URL: script not installed yet
Version of script: Version: 1.1
Version of PHP: PHP_4.3.11
Host: Apache_1.3.33
Have you searched for your problem: YES
If so, what terms did you try: keyword= "301"
I spent hours researching click counter scripts. I liked yours best. Before I install it there are a couple of small changes I'd like to make.
(1) For the past two years there have been countless complaints on SEO forums about Google incorrectly attributing content from destination pages to sites using HHTTP/1.1 302 redirects. It has happened to me too. I've seen my homepage listed in Google with the URL of someone else's link page. I don't want to do that to other webmasters. Apparently, the problem doesn't occur if a 301 "Permanent" redirect is used (see http://www.elouai.com/redirect.php). I would like to add an extra line at the end of click.php:
(2) In the article it says: "You can accidently hide your pages from getting properly indexed by Google if in the URL string you have the 'id' parameter. Google would then assume that is a session id and would not follow the link." I don't know whether that's true, but I'd like to play safe and rename the token like this:
I'm a PHP newbie, but I think it would only require a small change at the beginning of click.php:
And just in case a webmaster visits the page that linked to her site I'd like to rename 'click.php' [in settings.php]. The filename will then show what kind of redirect is being used:
http://www.example.com/ccount/redirect-301.php?site=13
Please let me know if you see any potential problems that I overlooked. Thanks.
phpNewbie
Version of script: Version: 1.1
Version of PHP: PHP_4.3.11
Host: Apache_1.3.33
Have you searched for your problem: YES
If so, what terms did you try: keyword= "301"
I spent hours researching click counter scripts. I liked yours best. Before I install it there are a couple of small changes I'd like to make.
(1) For the past two years there have been countless complaints on SEO forums about Google incorrectly attributing content from destination pages to sites using HHTTP/1.1 302 redirects. It has happened to me too. I've seen my homepage listed in Google with the URL of someone else's link page. I don't want to do that to other webmasters. Apparently, the problem doesn't occur if a 301 "Permanent" redirect is used (see http://www.elouai.com/redirect.php). I would like to add an extra line at the end of click.php:
Code: Select all
// Redirect to the link URL
header("HTTP/1.1 301 Moved Permanently");
Header("Location: $url");
exit();
Code: Select all
Before: http://www.example.com/ccount/click.php?id=13
After : http://www.example.com/ccount/click.php?site=13
Code: Select all
// First check if the ID is set and ...
$id=$_GET['site'];
if(empty($id)
http://www.example.com/ccount/redirect-301.php?site=13
Please let me know if you see any potential problems that I overlooked. Thanks.
phpNewbie