[Xitami] 301 error handling

Russel Olinger rolinger1 at hotmail.com
Wed Feb 20 09:04:27 CET 2008


Well I have figured out how to do script error handling with Perl and PHP.  But the logs don't reflect what is going on because if the script exists, Xitami returns a '200 OK'.  Once the script is executed, the script determines if a 301 or 404 (or which ever code is needed) and returns that to the browser.  So the log says 200, but the HTML Response Headers show 404.  How can this be corrected?

In addition, everything is coming back as HTTP/1.0 - the documentation says Xitami Server supports 1.0, but then goes on to say Virtual Hosts support HTTP/1.1 - why would the main server support one thing versus the virtual servers supporting another?  http://legacy.imatix.com/html/xitami/

Thanks
  ----- Original Message ----- 
  From: Martin Bleisteiner 
  To: Xitami Users General Discussion 
  Sent: Tuesday, February 19, 2008 11:30 PM
  Subject: Re: [Xitami] 301 error handling


  What about the following idea - I don't know if it really works:

  Make the 404 Error Handler be handled by PHP.
  Write a PHP script that modifies the header to 301 instead 404. You will need a script anyway for assigning the correct new path according to the old path.

  I remember there was the question how to use 404 with PHP here a few weeks ago.

  Martin
    ----- Original Message ----- 
    From: Russel Olinger 
    To: Xitami Users General Discussion 
    Sent: Wednesday, February 20, 2008 3:50 AM
    Subject: [Xitami] 301 error handling


    Hey all,

    The "errors" section of the Xitami admin has predefined values for 400, 401, 404 errors etc, but nothing for 301 redirects.  I am in the process of renaming my static links from ID based links such as /postShow/3/26/0/383472 to name based links like /postShow/chat-groups/local-politics/page-0/id-383472 or something to that affect.

    However, I don't want search engines such as google or yahoo that have already crawled and indexed all the ID based links to error out, or drop the indexed link, after I make the change - I have over 100,000 indexed pages.  This is more important for the search engines than it is for the users. If the search engine sees that the ID based links are gone without info one where they have gone to, they will drop all the indexed links and it could take weeks if not months for them to recrawl the new links.

    Other webservers such as apache can use 301 redirects to basically tell the SE, the user or the browser, that although the old links have changed the content still exists - its just simply at a new location.  The SEs will simply change the index link versus dropping it completely.  Doing a simple "redirect=0" in the HEAD or using JS "location.href=..." isn't good enough because to a search engine the original page still exists but now its content is simply gone or empty.

    Is it possible to define errors or anyone know of a way to code in 301 redirects at the server level?

    Thanks.


----------------------------------------------------------------------------



    --
    Xitami Users Mailing List -- For Xitami support
    To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami


------------------------------------------------------------------------------



  --
  Xitami Users Mailing List -- For Xitami support
  To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xitami.org/pipermail/xitami/attachments/20080220/9c2a27c5/attachment.htm 


More information about the Xitami mailing list