How to edit 404.php?

Discussion in 'Programming' started by MervikHaums, Oct 12, 2009.

  1. #1
    Hey there,

    I could found a very odd problem with my blog. As we know we can easily change the permanent links from the format blogname/?p=74 to blogname//%year%/%monthnum%/%postname%/ or similar. I have even installed a plugin for this purpose. But when I tried to change the permanent link except the blogname/index.php nothing is working. It pops out page not found error. Could you please tell what exactly I have to do for making this work. Do I have to alter anything for this purpose in the hosting panel. I mean other than the wordpress admin dashboard? the 404 page should be edited?

    If so could you please tell how to edit that one? You can see that still the blog titles are not displayed at the url :( I scare that SE's may not index its because of this.. Here is the blog link SEO Tips and Information


    After doing a search I could get a 404 handler code

    <?php
    $qs = $_SERVER['QUERY_STRING'];
    $pos = strrpos($qs, '://');
    $pos = strpos($qs, '/', $pos + 4);
    $_SERVER['REQUEST_URI'] = substr($qs, $pos);
    $_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
    include('index.php');
    ?>

    i edited it too, but still not working... Please look at the url you can still see the ?p=number format... :(

    While changing the format this is the error am getting


    404 Not Found

    Not Found

    The requested document was not found on this server.
    Web Server
     
    Last edited: Oct 12, 2009
    MervikHaums, Oct 12, 2009 IP