Forum Moderators: Robert Charlton & goodroi
10.3.2 301 Moved Permanently
The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs.
10.3.3 302 Found
The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests.
The way I interpret this is that if a the content of a resource can now be permanently found at another URL, the server should return a 301 status.
old-page-1 => new-page-1 old-page-2 => new-page-2 old-page-3 => new-page-3 old-page-4 => new-page-4 In my case and I guess BradleyT's as well, this happens to be the homepage.
it will never be a replacement for dozens or hundreds or thousands of old pages
index_us.php and welcome.php.
301 > 301 > 200
That's a chain and is to be avoided at all costs.
So, what exactly is wrong with this setup other than MC's hint at each 301 losing a bit of "link juice"?
I don't think that's possible (unless both sites have synchronized databases): the first 301 is issued on a site that has no way of knowing the correct destination URL. If I return 200 and the correct content on that first 301 without issuing another 301, I would create a URL with content that's duplicate of the final destination.
Site 1 redirects to Site 2 but does not "know" Site 2's URL structure so redirects to a "dispatcher" script at Site 2 (first 301->301)
That would be an implementation error. You should rewrite the request to the script and the script then issue a single 301 redirect to the correct URL.
There is potentially another way; set up a proxy rule to pass the request arriving at the old site, silently and directly to the new site, and get the script on the new site to issue the redirect to the new URL.I'll definitely look into this (do you mean RewriteCond %{HTTP:XROXY_CONNECTION} in .htaccess?). I'm all for limiting the number of the redirects whenever possible. Oh, and in my case I don't redirect the entire Site 1, which adds some complexity. Site 1 is still running, I have just transferred one section of it to Site 2 hence the complicated setup. Thanks!