首页 > 解决方案 > HTTP 方法的重定向

问题描述

Stackoverflowers,有人可以就以下问题提出建议:

我需要将 http url 方法列表重定向到另一台服务器,当它们被命中时,网站的其余方法不被重定向。你能告诉我如何做到这一点吗?这就是我的意思:

base address = https://example.com

<base address>/methods/asyncwebmethods.ashx/JwtTokenLogin
to be redirected to  
<http://bg2-858-lt>/JwtTokenLogin

<base address>/methods/asyncwebmethods.ashx/logout 
to be redirected to 
<http://bg2-858-lt>/JwtTokenLogin

<base address>methods/betting.ashx/updateRegularCartItems
to be redirected to
<http://bg2-858-lt>/updateRegularCartItems

标签: httpnginxproxyreverse

解决方案


您可以通过多种方式做到这一点。1.简单的jquery来处理点击登录/注销按钮时的动作。2. 在httpd.conf 3. 在servelt 你可以重定向。


推荐阅读