0
我已经迁移Linux下一个WordPress博客沐向WP 3 IIS 7下,所以我需要重定向到http://mydomain.com/blog/blahblah/http://mydomain.com/blahblah/为什么我的IIS 7重写规则不起作用?
我加入到WordPress的web.config中
<rule name="rewrite /blog/">
<match url="^/blog/([_0-9a-z-]+)/" />
<conditions>
</conditions>
<action type="Rewrite" url="/{R:1}/" />
</rule>
,这样的web.config现在包含:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
<rule name="rewrite /blog/">
<match url="^/blog/([_0-9a-z-]+)/" />
<conditions>
</conditions>
<action type="Rewrite" url="/{R:1}/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
WordPress的继续工作,但/博客/没有重定向。为什么?
我复制并粘贴到web.config中,但仍然重定向不会发生:错误404 – user310291 2011-06-13 11:14:17
我已经更新了我的答案 - 请 – LazyOne 2011-06-13 11:26:25
嗯,好的,谢谢我不知道其中的差异,但现在它的作品:) – user310291 2011-06-13 13:06:30