<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
	<security>
            <requestFiltering>
                <fileExtensions>
                    <add fileExtension=".cer" allowed="false" />
                    <add fileExtension=".html" allowed="false" />
					 <add fileExtension=".htm" allowed="false" />
                </fileExtensions>
                <denyUrlSequences>
                    <add sequence="/uploads/" />
                </denyUrlSequences>
				 <alwaysAllowedUrls>
                </alwaysAllowedUrls>
            </requestFiltering>
        </security>
        <rewrite>
            <rules>
	             <rule name="rule1" stopProcessing="true">
                     <match url="^article/([0-9]+)/([_0-9a-z-]+)" />
                     <action type="Rewrite" url="article.aspx?id={R:1}&amp;title={R:2}" />
                </rule>
                <rule name="rule2" stopProcessing="true">
                    <match url="^tags/([0-9]+)" />
                    <action type="Rewrite" url="tags.php?tags={R:1}"  />
                </rule>
				<rule name="rule3" stopProcessing="true">
                    <match url="^test.html" />
                    <action type="Rewrite" url="test.asp"  />
                </rule>
            </rules>
        </rewrite>
    </system.webServer> 	
</configuration>
打开Web.config配置文件,</system.webServer>标签里
增加以上参数


发表评论 已发布 0

还可以输入 800 个字
 
 
打印