我正在使用匹配表达式https://([^/]*)/(.*)并将表达式替换为constantprefix/$ 2并尝试通过向所有URL添加"/ constantprefix"来重写传入的URL
对于以下网址,它按预期工作:
我对已经以/ constantprefix开头的URL有问题,我在输出URL中看到两个/ constantprefix/constantprefix,我不想找,有什么办法可以避免吗?
如果传入的URL是https://hostname/constantprefix/login/index.aspx,那么输出的URL将变为https://hostname/constantprefix/constantprefix/login/index.aspx 我可以知道如何从匹配中避免/ constantprefix/constantprefix表达?