I have tried:
1) I tried empty string first:
<action type="Redirect" url="" redirectType="Permanent" appendQueryString="false" />
Result:
HTTP 500.52 - URL Rewrite Module Error.
The substitution URL for the current action cannot be empty.
2) Maybe I should omit the url
attribute:
<action type="Redirect" redirectType="Permanent" appendQueryString="false" />
Same result:
HTTP 500.52 - URL Rewrite Module Error.
The substitution URL for the current action cannot be empty.
3) What about the ASP.NET way:
<action type="Redirect" url="~" redirectType="Permanent" appendQueryString="false" />
Tries to redirect to {APP_ROOT}/~
.
4) Last try:
<action type="Redirect" url="/" redirectType="Permanent" appendQueryString="false" />
As expected, it redirects to the root of the server...
I'd like to find some clean generic solution. (I cannot use some concrete /myCurrentAppPath
.)
这效果更好:
<action type="Redirect" url="." redirectType="Permanent" appendQueryString="false" />
现在尝试这个,它不干净,但它的工作原理:
<action type="Redirect" url="?" redirectType="Permanent" appendQueryString="false" />
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.