问题描述
我想防止打开重定向 - 可以使用诸如
之类的 url 触发https://www.somewebsite.com/%5cexample.com%2F%2F
我尝试创建规则来阻止 /%5cexample.com%2F%2F,但老实说,我不知道我在做什么,它不起作用也就不足为奇了..
<rule match-type="regex">
<condition type="method" next="and">GET</condition>
<condition type="request-uri" operator="notequal" next="and">^/%5s(.*)$</condition>
<condition type="request-uri" operator="notequal">(^/jobs/(b|job|employer|employers)/(.*)$)</condition>
<from>^/(?!/)(.*)/(.*)/$</from>
<to type="permanent-redirect" qsappend="true">/$1/$2</to>
</rule>
有什么想法可以做到这一点吗?
也许是一个单独的规则
<rule match-type="regex">
<condition type="method" next="and">GET</condition>
<from>^/%5c(.*)/$</from>
<to type="permanent-redirect">/</to>
</rule>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)