Getting IIS6 to play nice with WordPress Pretty Permalinks

点点圈 提交于 2019-12-24 00:26:25

问题


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.


回答1:


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

Hope that helps!




回答2:


IIRF does this, for IIS6.

Free.




回答3:


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>



回答4:


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 :-)




回答5:


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



来源:https://stackoverflow.com/questions/113489/getting-iis6-to-play-nice-with-wordpress-pretty-permalinks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!