开发者社区> 问答> 正文

IIS7伪静态显示500。。有没有高手帮我看一下我的伪静态规则哪里错了

`console.log(<?xml version="1.0" encoding="UTF-8"?>

<system.webServer>
    <rewrite>
        <rules>
            <rule name="已导入的规则 1">
                <match url="^article/(\d+)$" 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?m=article&amp;a=index&amp;id={R:1}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 2" stopProcessing="true">
                <match url="^article/(\d+)/$" ignoreCase="false" />
                <action type="Redirect" url="/article/{R:1}" redirectType="Permanent" />
            </rule>
            <rule name="已导入的规则 3">
                <match url="^tag/(.*?)/(\d+)$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=tag&amp;a=index&amp;tag={R:1}&amp;page={R:2}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 4">
                <match url="^tag/(.*?)$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=tag&amp;a=index&amp;tag={R:1}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 5">
                <match url="^tagcloud/(\d+)$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=tag&amp;a=tagcloud&amp;page={R:1}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 6">
                <match url="^history/$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=history&amp;a=index" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 7">
                <match url="^history/(\d+)/(\d+)/(\d+)/$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=history&amp;a=index&amp;year={R:1}&amp;month={R:2}&amp;day={R:3}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 8">
                <match url="^history/(\d+)/(\d+)/(\d+)/(\d+)/$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=history&amp;a=index&amp;year={R:1}&amp;month={R:2}&amp;day={R:3}&amp;page={R:4}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 9">
                <match url="^users/(\d+)/$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=users&amp;a=index&amp;uid={R:1}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 10">
                <match url="^users/(\d+)/article/$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=users&amp;a=index&amp;uid={R:1}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 11">
                <match url="^users/(\d+)/article/(\d+)/$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=users&amp;a=index&amp;uid={R:1}&amp;page={R:2}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 12">
                <match url="^users/(\d+)/(\w+)/$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=users&amp;a={R:2}&amp;uid={R:1}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 13">
                <match url="^users/(\d+)/(\w+)/(\d+)$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=users&amp;a={R:2}&amp;uid={R:1}&amp;page={R:3}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 14">
                <match url="^avatar/(\w)/(\d+).jpg$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=avatar&amp;a=index&amp;size={R:1}&amp;uid={R:2}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 15">
                <match url="^m/(.*?)$" ignoreCase="false" />
                <action type="Rewrite" url="m/{R:1}" />
            </rule>
            <rule name="已导入的规则 16">
                <match url="^(\w+)/$" 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?m=index&amp;a={R:1}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 17">
                <match url="^(\w+)/(\d+)/$" ignoreCase="false" />
                <action type="Rewrite" url="index.php?m=index&amp;a={R:1}&amp;page={R:2}" appendQueryString="false" />
            </rule>
            <rule name="已导入的规则 18" stopProcessing="true">
                <match url="^(\w+)$" ignoreCase="false" />
                <action type="Redirect" url="/{R:1}/" redirectType="Permanent" />
            </rule>
            <rule name="已导入的规则 19" stopProcessing="true">
                <match url="^(\w+)/(\w+)$" ignoreCase="false" />
                <action type="Redirect" url="/{R:1}/{R:2}/" redirectType="Permanent" />
            </rule>
            <rule name="已导入的规则 20" stopProcessing="true">
                <match url="^(\w+)/(\w+)/(\w+)$" ignoreCase="false" />
                <action type="Redirect" url="/{R:1}/{R:2}/{R:3}" redirectType="Permanent" />
            </rule>
            <rule name="已导入的规则 21" stopProcessing="true">
                <match url="^(\w+)/(\w+)/(\w+)/(\w+)$" ignoreCase="false" />
                <action type="Redirect" url="/{R:1}/{R:2}/{R:3}/{R:4}" redirectType="Permanent" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>


)`

展开
收起
纳兰泯月 2016-04-10 14:17:54 3791 0
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载