【问题标题】:How to setup Wordpress Pretty Permalink on shared IIS7 hosting with no url rewrite module installed如何在没有安装 url 重写模块的共享 IIS7 主机上设置 Wordpress Pretty Permalink
【发布时间】:2011-05-16 14:54:53
【问题描述】:

我已经在我的网站 www.22shruti.com/blog/ 上设置了 Wordpress 博客 v2.9.2(共享 IIS 7.0 托管(服务器上没有管理员权限),PHP 5.2.13 FastCGI,WHB 操作系统 2008,没有已安装 url 重写模块。)

由于从 SEO 角度来看,漂亮的永久链接很有用,当我尝试通过管理员将 WP 永久链接设置更改为自定义“/%year%/%monthnum%/%postname%/”时,我在 www.22shruti 上收到以下消息.com/blog/

“未找到对不起,但您正在寻找不在这里的东西。”

在这种情况下实现所需永久链接格式的分步解决方案是什么?非常感谢您的帮助

【问题讨论】:

    标签: wordpress iis-7 shared-hosting permalinks


    【解决方案1】:

    我想你会在这里找到答案 - How To Set Pretty Permalinks in Wordpress Runs On IIS 7 我想你需要在根文件夹中放置一个 web.config 文件,例如:

    <?xml version="1.0"?>
    <configuration>
     <system.webServer>
     <defaultDocument>
      <files>
        <remove value="index.php" />
        <add value="index.php" />
      </files>
     </defaultDocument>
    <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/{R:0}" />
         </rule>
     </rules>
    </rewrite>
    </system.webServer>
    </configuration>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-09-30
      • 1970-01-01
      • 2018-04-24
      • 2014-01-20
      • 1970-01-01
      • 2019-01-10
      • 2018-05-15
      相关资源
      最近更新 更多