Tag Archives: IIS

WordPress Pretty Permalinks

I changed the permalinks to be pretty but it breaks my site.

I updated the web.config with the right code but its still not working.

These are things that are commonly found when googling around about pretty permalinks.

Many of the message boards and blogs will tell you that wordpress is meant to run on Linux. Well it works great on Linux, arguably more predictable and more supported. But its also supported on mac and windows. If (for whatever reason) you need to run this on a Windows IIS server then setting up pretty permalinks will require messing with the web.config file for the Microsoft URL Rewrite Module. The WordPress Codex has everything you need to do this on Windows (and linux too).

The one thing that kicked my but for a couple of hours, and isn’t well documented, is that the web.config files don’t nest very well. The site I was working on was in a folder 1 level down with its own web.config file. Long story short, I figured out that there was a web.config file at the root level of the web server that was interfering with the URL rewrite. I changed to pretty permalinks, filled out my site’s pretty permalinks properly, and got 404 errors on all the pages. Once I removed the web.config file from the root level, my wordpress site began working properly, and gave me my pretty permalinks.