web.config
的Url Rewrite
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Deny Cvs Access" stopProcessing="true">
<match url=".(svn|git|ht|DS)$" />
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Deny Access" />
</rule>
<rule name="Static Access" stopProcessing="true">
<match url=".(ico|js|css|png|jpg|gif|swf|pdf|mov|fla|zip|rar|txt|gz|tar)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="None"/>
</rule>
<rule name="Hide Index" stopProcessing="true">
<match url="." ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
网友评论