例如:
     URL: http://www.xxxx.com/problems/question & answer/question & answer/question & answer/question & answer
urlrewrite配置理想情况为:<rule>
    <from>/problems/(.*?)/(.*?)/(.*?)/(.*?)</from>
    <to>/problems.action?param=$1&amp;param=$2&ampp;aram=$3&amp;param=$4</to>
</rule>可是problems.action中得到param的每个值为 question,而不是 question & answer
该如何处理?

解决方案 »

  1.   

    http://www.xxxx.com/problems/question%20%26%20answer/question%20%26%20answer/
      

  2.   

      &在是个关键字符,如果question & answer是作为一个值的话,你可能把&换成别的字符啊
      

  3.   

    比如:http://localhost:80/a.jsp?id=1#top
    这里出现的所有非数字英文的字符都是关键字符除了'_'和'-',非数字非英文的字符最好都转成%XX编码转换也很简单,写个html
    <form method="get" action="">
    <textarea name=txt></textarea>
    <input type=submit>
    </form>
    输入内容提交后看地址栏,显示1.html?txt=xxxxxx后面这段就是编码了