2009-07-06 33 views
3

[OK]を、これは私にナットを運転している...私はこのような私のURLを書き換えしようとしている:IIS URL書き換え

Now: 
http://www.somedomain.com/Somepage.aspx 
http://www.somedomain.com/AnotherPage.aspx 

Desired: 
http://www.somedomain.com/somepage/ 
http://www.somedomain.com/anotherpage/ 

誰もがこれで私を助けることはできますか?ユーザーインターフェイスの用語は混乱します。

ありがとうございました。

答えて

3

私は答えを見つけた:

<rewrite> 
    <rules> 
    <rule name="Redirect" stopProcessing="true"> 
     <match url="^([^\.]+)\.aspx$" /> 
     <conditions> 
     <add input="{REQUEST_METHOD}" negate="true" pattern="^POST$" /> 
     </conditions> 
     <action type="Redirect" url="{ToLower:{R:1}}/" appendQueryString="false" redirectType="Permanent" /> 
    </rule> 
    <rule name="Rewrite" stopProcessing="true"> 
     <match url="^([^/]+)/$" /> 
     <conditions> 
     <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
     <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
     </conditions> 
     <action type="Rewrite" url="{R:1}.aspx" /> 
    </rule> 
    </rules> 
</rewrite>