Apr 27

I host WordPress on IIS (a WAMP stack) and wanted to use WordPress 404 pages and not use the default IIS 404 pages.  The reason is that online exist a bunch of links to this site that are out of date.  I’d rather a simple 404 with links is returned to users and not the IIS default.

It was a simple change once I realized where the WordPress 404 Page exists, /index.php?error=404

Launch IIS Admin, right-click the website and choose Properties.  Go into the Custom Errors tab and for the 404 HTTP Errors, double-click and choose URL (instead of default file).  Enter the URL not forgetting the leading forward slash.

Untitled-1

Save and hit a URL that WordPress won’t recognize (ie, http://yoursite/thisfolderdoesntexist/) and what returns will be the WordPress Page Not Found / 404 Error, not the generic IIS page.


Related Posts


  • Print This Post Print This Post

  • One Response to “Use WordPress 404 Pages instead of IIS 404 Pages”

    1. Andy says:

      Hi,

      This is great – but when I try it, I just get a blank page when I hit a page that doesn’t exist? When I check the source code, that’s completely blank too.

      I’m on a windows 2008 server with iis 7.

      Any ideas?

      Thanks in advance!

      Andy

    Leave a Reply

     

     

    preload preload preload
    © 2010 Vikram Pant       All Opinions Are My Own And Not That Of My Employer(s)       Site Powered By WordPress   Theme is Pageline's iBlog2