Wordpress Permalinks in IIS using Custom 404 Redirect

When setting up this blog on a Windows host I couldn’t find a way to create “pretty permalinks”. I finally settled on a solution developed by CaptainN and posted on in the support section on wordpress.org. All you need to do is create a 404 page in php with four lines of code.

  1. Create the file wp-404-handler.php in your base Wordpress folder.
  2. Set your sites 404 page to point to the wp-404-handler.php url. Most control panels at web hosts allow you to do this. If you’ve got the option to select between FILE and URL then choose URL.
  3. Go to Options -> Permalinks in your Wordpress admin page, and choose an appropriate structure for your links. I chose Custom with this pattern: /%year%/%monthnum%/%day%/%postname%/

Tip of the hat to: Einar Egilsson

2 Responses to “Wordpress Permalinks in IIS using Custom 404 Redirect”


  1. 1 Daniel

    I couldn’t understand some parts of this article Wordpress Permalinks in IIS using Custom 404 Redirect, but I guess I just need to check some more resources regarding this, because it sounds interesting.

  2. 2 den

    What exactly do you men by “Set your sites 404 page to point to the wp-404-handler.php url”?. How do I do that with Wordpress?.

Leave a Reply