Displaying the 404 page problems (3 posts)

Topic tags: 404, custom template, error, errors, php
  • Profile picture of Chad Chad said 1 year, 9 months ago:

    Hello,

    I am having problems displaying my custom 404.php page. When a page does error it gives me a 404 – File page not found – Server error.

    I never ran wordpress on a Windows server before and i think it may be caused by the web.config file.

    This site is using Custom page templates and can be seen here http://www.mlstechfair.com and just make a page error and you will see the server error.

    Any help will be greatly appreciated

    Thanks
    Chad

  • Profile picture of Steve Steve said 1 year, 9 months ago:

    I’m not an expert on Windows server, but have you read these;

    http://wordpress.org/support/topic/custom-error-page-in-windows-based-server

    http://timheuer.com/blog/archive/2010/05/11/running-wordpress-on-windows-server-2003.aspx

  • Profile picture of Kevin Cristiano Kevin Cristiano said 1 year, 9 months ago:

    Hi,

    I have been fortunate (?) to run WordPress on IIS for a long time.

    You will need to edit your web.config. The web.config is the IIS equivilant of an apache .htaccess file.

    Specifically, you need to have the following:

    httpErrors existingResponse=”PassThrough”

    Let me know off line if you need help in configuring this, I don’t know how to post XML code here without it being stripped :)

    I have been running this for years. Let me know if you need any help editing the web.config

    I uploaded two samples:

    HTTP passthrough for 404.php to display –http://wpdev.kcristiano.com/wp-content/uploads/2011/09/webconfighttppassthrough.txt

    Full web config (with pretty permalinks) http://wpdev.kcristiano.com/wp-content/uploads/2011/09/webconfigfull.txt