2016-10-05 7 views
0

IISの単純なURL書き換えルールが必要です。ドメインの後にURLに"/i"が含まれていない場合は、追加します。例についてはIISの単純なURL書き換えルール

www.abc.com:

は、私はそれを変更するルールを必要

www.abc.com/sample/test.aspx 場合/i/sample/test.aspx

答えて

0

ルールは次のようにする必要があります。

<rule name="prepend i"> 
    <match url=".*" /> 
    <conditions> 
     <add input="{REQUEST_URI}" pattern="^/i/" negate="true" /> 
     <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
     <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
    </conditions> 
    <action type="Redirect" url="/i/{R:0}" /> 
</rule> 
関連する問題