无名轻博客-虚拟空间实现伪静态

web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <handlers>
            <remove name="PHP-7.0-7i24.com" />
            <remove name="PHP-5.6-7i24.com" />
            <remove name="PHP-5.5-7i24.com" />
            <remove name="PHP-5.4-7i24.com" />
            <remove name="PHP-5.3-7i24.com" />
            <remove name="PHP-5.2-7i24.com" />
            <add name="PHP-5.6-7i24.com" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="c:\php\5.6\php-cgi.exe" resourceType="Either" />
        </handlers>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1" stopProcessing="true">
                    <match url="post-([0-9]+)\.html$" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php?act=pl&amp;id={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 2" stopProcessing="true">
                    <match url="comment-([0-9]+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?act=plist&amp;p={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 3" stopProcessing="true">
                    <match url="index-([0-9]+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?p={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 4" stopProcessing="true">
                    <match url="list-([0-9]+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?tid={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 5" stopProcessing="true">
                    <match url="list-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?tid={R:1}&amp;p={R:2}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 6" stopProcessing="true">
                    <match url="index\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php" />
                </rule>
                <rule name="Imported Rule 7" stopProcessing="true">
                    <match url="archives\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?act=archives" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 8" stopProcessing="true">
                    <match url="comment\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?act=plist" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

分享 2020-11-05 23:20:21 通过 网页 浏览(157)

共有0条评论!

发表评论

更换一道题!