0

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

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>
4

0 回答 0