例如:

<rule> <from>^/create#name=(.*)$</from> <to>/page/new/success.jsp?name=$1</to> </rule>

当我输入“ / create#name = elvis”之类的uri时,它无法重写并转发到新地址,我该怎么办,如何对符号“#”进行转码

???

===============>>#1 票数:0

像这样工作(转义#符号)吗?

添加类型转发:

<rule>
  <from>/create\#name=(.*)</from>
  <to type="forward">/page/new/success.jsp?name=$1</to>
</rule>

添加类型重定向:

<rule>
  <from>/create\#name=(.*)</from>
  <to type="redirect">/page/new/success.jsp?name=$1</to>
</rule>

  ask by user2284711 translate from so

未解决问题?本站智能推荐: