Rewrite rule of iis is not working

回眸只為那壹抹淺笑 提交于 2019-12-08 10:40:32

问题


I want to make a redirection like that:

localhost:80/api/* to localhost:8080/api/*

I'm trying to use iis to do this task but is not working, the rule that i have used is :

(Pattern)(RE) ^api/(.*) (Action)(Rewrite) http://localhost:8080/{R:1}

https://i.stack.imgur.com/6svRA.png

How can it be done?


回答1:


Your rule looks correct. I think the problem that you don't have ARR installed/enabled. Please follow this steps:

1) You need to install ARR module for IIS

2) Enable ARR. On the Application Request Routing page, select Enable proxy

3) Restart IIS and check that your rewrite rule is working



来源:https://stackoverflow.com/questions/47034128/rewrite-rule-of-iis-is-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!