使用查询字符串将Apache URL重写为Ajax URL

问题描述

我有URL重写要求,下面是示例URL,它是ajax调用,将调用click事件

来自 https://www.test.com/load/research/compare?submit=true&Actions=ajax&componentID=1600176192830&alias=test-with-machine&subFeature=%2Ftemplate%2Fcontent%2Fmedia

收件人

https://www.test.com/learn/research/detail?submit=true&Actions=ajax&componentID=1600176192830&alias=test-with-machine&subFeature=%2Ftemplate%2Fcontent%2Fmedia

我尝试了多种方法来处理此问题,但都失败了,下面是VHOST条目

#RewriteCond %{QUERY_STRING} ^(.*)submit=true(.*)$
#RewriteCond %{QUERY_STRING} (^|&)submit=([^&]*)(&|$)
#RewriteCond %{QUERY_STRING}   ^(.*&)?submit=true?(&|$) [NC]
RewriteCond %{QUERY_STRING} !^$
    RewriteRule ^/load/research/^(.*)/$           http://localhost:8080/learn/research/detail? [QSA]

任何帮助将不胜感激。谢谢

解决方法

以下URL可以正常工作

wl   Spec
300  41.03
301  61.77
302  51.84

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...