Getting IIS6 to play nice with WordPress Pretty Pe

2019-07-11 21:10发布

I've got a WordPress powered blog that I'm trying to get setup on our IIS6 server and everything works besides the permalink structure which I'm having a big headache with.

After googling around/wordpress codex I learned that it's because IIS6 doesn't have the equivalent of Apache's mod_rewrite which is required for this feature to work. So that's where I'm at now. I can't seem to find a functional solution to get the pretty permalinks to work without the "index.php/," anyone have any recommendations?

What I can't do:

  • Upgrade to IIS7
  • Switch to Apache
  • Quit my job

Those suggestions have been offered to me, which sadly, I can't do any of those. Just an, FYI.

Much thanks for anyone who can lead me in the right direction.

5条回答
你好瞎i
2楼-- · 2019-07-11 21:16

I just came across the following answer on another question: Pretty URLs for search pages

Hope that helps!

查看更多
走好不送
3楼-- · 2019-07-11 21:20

I use a shared IIS7 host for my Wordpress blog, so I don't have the option of installing a URL rewrite module either. After a bit of searching round, the best workaround I could come up with was to use a custom 404 error handler, that fixes up some server variables and then hands the request on to index.php for processing. To show that this actually works, I will link to the relevant post on my blog :-)

查看更多
▲ chillily
4楼-- · 2019-07-11 21:23

IIRF does this, for IIS6.

Free.

查看更多
神经病院院长
5楼-- · 2019-07-11 21:29

i was struggling with this problem from few days, and after search so much stuff i got solution and now i have pretty permalinks in my self hosted (IIS7+ windows Server)blog. (Prerequisites: PHP5.0+ Version and FAST CGI SCRIPT - Don't use ISAPI Filter)

I have made one web.config you need to put that file in your root directory and done. http://www.geekblogger.org/2010/03/how-to-set-pretty-permalinks-in.html

查看更多
我想做一个坏孩纸
6楼-- · 2019-07-11 21:35

I researched this topic briefly and it seems you need an additional piece which is called URL Rewrite (Go Live).

Here is an article that walks you through how to create a rewrite rule using this. They also require IIS7, which I am not sure if it's really important. But it might be another thing you have to take care of.

Just in case the above URL fails later, here is an example rewrite rule for Wordpress:

<rewrite>
    <rules>
        <rule name="Main Rule" stopProcessing="true">
            <match url=".*" />
            <conditions logicalGrouping="MatchAll">
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php" />
        </rule>
    </rules>
</rewrite>
查看更多
登录 后发表回答