我想爲我的web.config中的重定向規則寫一條規則。web.config中的IIS url重定向規則
我想重定向像URL ...
http://www.example.net/profile/username
到...
http://www.example.net/#/profile/username
我已經添加了以下運行,但它似乎並沒有工作。做這個的最好方式是什麼?
<rule name="Redirect to hashed profile" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}{REQUEST_URI}" pattern="on" ignoreCase="true" pattern="^.net/profile/*"/>
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/#/{REQUEST_URI}" redirectType="Permanent" appendQueryString="true" />
</rule>