WordPress PermaLinks in IIS without the mod_rewrite

In a previous post, I mentioned that I was investigating a way to use real permalinks without using any of the ISAPI mod_rewrite dlls. For the uninitiated, mod_rewrite is not natively supported in IIS (Window’s server), and to get the same functionality, you have to install separate programs. I’ve done that and that is how this blog has survived on a Windows server for the past year or so.

I was convinced that needn’t be the case though. There must be a way to have permalinks without having to install a whole separate mod_rewrite program (or extension). I detailed my plan in this post.

Well, I finally got around to it – and the plan worked!

Here’s the gist of it. It uses custom 404 redirect to send all “Page Not Found” errors to a script that reads a bunch of regular expressions (don’t worry, you don’t have learn regular expressions to use this) and figures out what page to feed back.

Now, some people may find my solution a bit odd considering it is written in ASP. You used ASP to extend wordpress?? Yes, and it worked :).

More detailed instructions, and a link to the needed files are located here:

WordPress Permalinks in IIS

Comments

  1. Rakesh says

    hi

    I am made one blog site url is http://www.2bincdev.com/jra/. Now what I want is, if you scroll down the page you will find a link called “comment” and Email. So I want to make both of them color change from black to red. I have tried so many options by making change in CSS but it doesn’t help. Can you pls suggest me any solution for this

    Thanks

  2. says

    Hello and thank you for the script. I have tried number of solutions but none of them are working. (including this)

    I think that the issue is that even the permalinks that start with index.php don’t work.

    i.e. only the first option with indhttp://www.mobiledeployments.com/?p=123 works. If I change it to http://www.mobiledeployments.com/index.php/2007/08/21/sample-post/

    it will not work either and thus I suspect that the custom permalinks are not working.

    I have my own IIS installation and I can control any settings – I am willign to donate some $ to anybody who can help please.

    Thx

    Tomas

  3. says

    Tomas,

    You are running Apache so this solution won’t work for you. You need to upload a real .htaccess file. You are using a server that WordPress was made for.

    Follow the instructions in the WordPress Permalinks area.

    Best,
    Tom

  4. jigs says

    Tom, have you tried this with https (SSL) website ?

    It seems MSXML cannot work with SSL sites (or atleast with wild card certs – *.xyz.com)

    I get the following error (on the line xml.send):
    msxml3.dll error ‘80072efd’ A connection with the server could not be established

    I think I resolved all other MSXML issues by changing to the following code:

    Set xml = Server.CreateObject(“Msxml2.ServerXMLHTTP.3.0”)
    ‘suppress ssl error messages using below
    xml.setOption 2, 13056

    but cannot get past the connection error.

    Thanks
    -jigs

  5. scott says

    Tried this and it’s great!! Thanks.

    Sidenote: This page is really hard to read however. Black text on dark red/black background?! (Opera 9.0)

  6. says

    Hi, I have a similar problem with Permalinks on WordPress, IIS.
    My site was installed XAMPP, not IIS.
    I put the file wp-404.handler.php as shown on your website, but the principle works if the Hosting (IIS6) they turned me 404 error, no longer works.
    If I do not activate the 404 error, if it works, but I have no error page and I still have the blank page, but at least Permaliks function.
    Now I have the default Permalinks panel in WordPress.
    I do not know whether to install IIS6 on Vista, I need to install Windows Server ..?
    Thank you very much.
    Good site this.

  7. says

    fantastic! I searched the web for too long for a solution like this. But I have a related issue. If my permalink structure is like /%postname%/, the pages works fine but any request with index.php/anything brings the homepage except the 404 error page. If the permalink is set to include the index.php phrase, then the 404 page works for invalid requests. Please help me how to use the permalink format mysite.com/%postname%/ having the 404 error pages functioning. Thanks in advance.

  8. impopanuadymn says

    Hello,

    What are the best web hosting company?

    I’m trying to set up a web site for my new business.

    appreciate your feedback,

    -Nick

Leave a Reply

Your email address will not be published.