IIS URL重写404错误

时间:2013-02-07 13:34:41

标签: iis url-rewriting

我正在运行下面的配置来重写例如

http://www.phusewebdesign.co.uk/blog/Get-in-touch

http://www.phusewebdesign.co.uk/index.php?s=blog&p=Get-in-touch

但是我收到了404错误,我错过了一些简单的东西我确定但是无法在谷歌或这里找到答案

感谢

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="RewriteUserFriendlyURL2" stopProcessing="true">
                    <match url="^([^/]+)/([^/]+)/?$" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php?s={R:1}&amp;p={R:2}" />
                </rule>
                <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
                    <match url="^([^/]+)/?$" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php?p={R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

0 个答案:

没有答案