【问题标题】:wordpress iis6 permalink /%postname%/ doesnt work IIRF url rewrite needed?wordpress iis 6 permalink /%postname%/ 不起作用 需要重写 IIS url?
【发布时间】:2011-07-29 04:43:33
【问题描述】:

我在 iis6 上有一个 wordpress 网站,我希望:php?id=6 看起来像这样:/postname/。当我更改永久链接时,我收到 404 错误。我启用了 IIRF 代理扩展,并且在我的根目录中有一个 IIRF.ini,其中包含以下代码:

RedirectRule ^/blog/index\.php/(.*)$ /blog/$1 [I,R=301]
RewriteRule ^/blog/(?!index\.php|wp-|xmlrpc)(.*)$ /blog/index.php/$1 [I,L]

对于仅 /%postname%/ 的永久链接,此代码是否不正确?

谢谢

【问题讨论】:

    标签: wordpress iis url-rewriting permalinks iirf


    【解决方案1】:

    我刚刚在运行 IIS6 的 Windows Server 2003 上安装了 IIRF 2.1。

    您的地址似乎一开始就有/blog/,但恐怕我们可以做得更简单。贝娄,跟着我的整个 Iirf.ini,用一个简单的永久链接工作:

    # Iirf.ini
    #
    # ini file for IIRF
    #
    
    RewriteEngine ON
    StatusInquiry ON
    IterationLimit 5
    
    # this will allow ugly URLs to not be processed at all
    RewriteRule ^/(?!index.php)(?!wp)([^\.]*)$ /index.php/$1 [I]
    

    确保这个简单的表单有效,然后添加 /blog/。

    一些可能有帮助的文献(它帮助了我)

    干杯!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-26
      • 1970-01-01
      • 1970-01-01
      • 2015-01-29
      • 2018-12-06
      • 2011-04-07
      • 1970-01-01
      • 2023-03-08
      相关资源
      最近更新 更多