vBulletin 4, the most powerful community software + vBSEO 3.5, the ultimate SEO solution = Your ultimate platform for 2010 and beyond. Click below to learn more.

Results 1 to 3 of 3

301 OK vs. 301 Permanently Moved?

This is a discussion on 301 OK vs. 301 Permanently Moved? within the Bug Reporting forums, part of the vBSEO SEO Plugin category; For some reason the headers being sent during a vBSEO redirect read 'HTTP/1.x 301 OK' instead of 'HTTP/1.x 301 Moved ...

  1. #1
    Senior Member Citricguy's Avatar
    Real Name
    Josh
    Join Date
    Nov 2006
    Location
    Maui, Hawaii
    Posts
    143
    Blog Entries
    7

    301 OK vs. 301 Permanently Moved?

    For some reason the headers being sent during a vBSEO redirect read 'HTTP/1.x 301 OK' instead of 'HTTP/1.x 301 Moved Permanently'. Is this supposed to be the case?

    I see a similar issue with 404 errors at PHP.net PHP: header - Manual

    I think it has to do with PHP being run as CGI. If it is being run as CGI would you use...

    Code:
    header("Status: 301 Moved Permanently"); 
    instead of... (for non CGI installs?)

    Code:
    header("HTTP/1.1 301 Moved Permanently"); 
    I did a grep -r '404 Not Found' * to see what vBulletin does to check for CGI installs, they use the following snipit of code for 404 errors, does it need to be done for 301 redirects in vBSEO?:

    Code:
    // This line of code was found in attachment.php
     
    if (empty($_REQUEST['attachmentid']))
    {
    // return not found header
    $sapi_name = php_sapi_name();
    if ($sapi_name == 'cgi' OR $sapi_name == 'cgi-fcgi')
    {
    header('Status: 404 Not Found');
    }
    else
    {
    header('HTTP/1.1 404 Not Found');
    }
    exit;
    }
    
    Well, I guess I really don't know if '301 OK' is even an issue, but could it be why most of my old pages (that have sense been hit by google and had the 301 OK redirect applied) haven't changed in googles index?

    Here are the captured headers from my sites 301 redirect with my notes in green..

    Code:
    This line is the inital request sent from my browser
    RHCP in NJ tonight! - Chaos Forums
     
    And the actual get request from my browser...
    GET /showthread.php?t=1368 HTTP/1.1
    Host: Chaos Forums
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Cookie: chaosforumslastvisit=1170149015; chaosforumslastactivity=0; __utma=45672950.1751800113.1170149027.1170224728.1170307614.3; __utmz=45672950.1170224728.2.2.utmccn=(organic)|utmcsr=google|utmctr=%22agrobot%20phatbot%22|utmcmd=organic; chaosforumssessionhash=a917f68a1205fa72d23d2549c0f99d88; __utmb=45672950; __utmc=45672950; chaosforumscpsession=6e51f9786177166c391337f3f509b9be; chaosforumsuserid=1; chaosforumspassword=7361f224a4b2ca8bad4eebbe256f2eef
     
    Here is the response from the server with (what i think) is a faulty 301 redirect.
    HTTP/1.x 301 OK
    Date: Thu, 01 Feb 2007 06:35:48 GMT
    Server: Apache/1.3.37 (Unix) mod_fastcgi/2.4.2 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
    X-Powered-By: PHP/4.4.4
    Location: RHCP in NJ tonight! - Chaos Forums
    Keep-Alive: timeout=15, max=100
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html
    

  2. #2
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,550
    Hello Josh,

    in both cases 301 HTTP code is sent, so I don't think this is an issue, but we will add the code to handle cgi version of PHP in the next vBSEO build.
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  3. #3
    Senior Member Citricguy's Avatar
    Real Name
    Josh
    Join Date
    Nov 2006
    Location
    Maui, Hawaii
    Posts
    143
    Blog Entries
    7
    Thank you Oleg!

    I wonder if malformed headers effect Google at all. All browsers seem to handle '301 OK' fine, I would assume spiders would too...

    O well, doesn't matter now, lol. Can't wait til' the next build!

Similar Threads

  1. moved from subdomain, which 301?
    By magnaromagna in forum URL Rewrite Settings
    Replies: 7
    Last Post: 09-10-2006, 07:59 PM
  2. 301 homepage
    By Ashley in forum General Discussion
    Replies: 2
    Last Post: 02-15-2006, 05:34 AM