Forums

[resolved] Custom 404 page in windows based server. (9 posts)

  1. zayatzz
    Member
    Posted 2 years ago #

    Hello

    Before anybody gets pissed and screams RTFM because im asking about help topic i am going to say that i have read the text at http://codex.wordpress.org/Creating_an_Error_404_Page

    And this text is of little use to me. I also had problem with human friendly urls, but that got solved when i entered /%postname%/ as default permalink conf and wordpress wrote into web.config file. Thats right... web.config not .htaccess - that is the root of my problems.

    Q1) - what do i have to do with web.config so that nonexisting urls were directed to index.php?error=404

    Q2) - what do i have to do with wordpress so that example.com/index.php?error=404 would display error page not my front page? The design that i am using has 404.php. This 404.php contains basic 404 stuff that the default 404.php has:

    <?php get_header(); ?>
    <div id="content" class="narrowcolumn">
    <h2 class="center">Error 404 - Not Found</h2>
    </div>
    <?php get_footer(); ?>

    but when i go to index.php?error=404 then all is see is frontpage. apparently this is not the problem of the design, as when i turn on the default design i get the same results.

    Alan

  2. zayatzz
    Member
    Posted 2 years ago #

    Ok i did some research and added this to my web.config :

    <httpErrors>
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="404" subStatusCode="-1" path="http://est243wp.myfolderburg.com/index.php?error=404" responseMode="Redirect" />
    </httpErrors>

    right after rewrite rules added by wordpress. It redirects to index.php?error=404, but that page is exactly like front page. I added
    <script type="text/javascript">alert("here!");</script>

    into 404.php but as i get no alert with text HERE, when going to missing page, i suspect that something else is wrong, but i have no idea what as i am wordpress newbie - Still need help here.

    Alan.

  3. zayatzz
    Member
    Posted 2 years ago #

    Hello!

    I scanned the forums and this problem seems to be at least 6 months old with no fix so far.

    Is this problem with how index.php deals with additional parameters?

    ?error=404 is just a parameter sent to index.php or what? And all other parameters like ?page_id=2 work just fine...

    Can anyone reply if this is right or wrong and what could be done?

    Alan

  4. AmmadZee
    Member
    Posted 2 years ago #

    zayatzz,
    i am facing the same problem. cant get the right 404 working. my installation in on godaddy and i already tried .htaccess method which was popular on google. ive got a bigger problem to deal with right now so i am going to put this on one side for the time being. hopefully soon ill look into it. btw who is your hosting provider?

  5. zayatzz
    Member
    Posted 2 years ago #

    Some estonian provider named folderburg.... http://www.folderburg.com - their page is in estonian, so i dont think you can find anything useful there and i do not think that the hosting is the issue anyway...

    somebody tell me if am wrong - if i enter address.com/index.php?error=404 i should see the error page no matter how the .htaccess or web.config redirects. Its valid address and it should work. But it does not so i suspect the problem is within wordpress code not htaccess...

    Especially since all other parameters following ? mark work just fine, like i said before - look stuff about ?page_id=2 working.

    I did go over the wordpress files with searchmonkey and found 404 related stuff in many files.. i would not even know where to start my search for the flaw... if it even exists. Some input from wordpress team would be really nice.

    Alan.

  6. zayatzz
    Member
    Posted 2 years ago #

    Bump... any help?

  7. zayatzz
    Member
    Posted 2 years ago #

    Is there a way to get/ask wordpress technical assistance - get feedback from the guys who actually wrote this wordpress code?

    Or they dont hang out here?

    Alan.

  8. zayatzz
    Member
    Posted 2 years ago #

    I found this old link which describes one solution.

    http://wordpress.org/support/topic/36214?replies=6

    The solution posted there still does not serve the 404.php i can set up and change through wordpress admin.

    Why couldnt it just work via index.php?error=404?

    I still could use help or explanation why i should use hacks and the default solution does not work....

    Alan.

  9. zayatzz
    Member
    Posted 2 years ago #

    Ok i finally found the stuff that works.

    solution is here:

    http://ruslany.net/2008/12/enable-custom-errors-in-wordpress-on-iis-70/

    Can finally set this topic resolved!

    Alan.

Topic Closed

This topic has been closed to new replies.

About this Topic