使用查询字符串将Apache URL重写为ajax URL
我有一个URL重写的要求,下面是示例URL,它是ajax调用将调用click事件 来自使用查询字符串将Apache URL重写为ajax URL,ajax,apache,url-rewriting,http-redirect,url-rewrite-module,Ajax,Apache,Url Rewriting,Http Redirect,Url Rewrite Module,我有一个URL重写的要求,下面是示例URL,它是ajax调用将调用click事件 来自 https://www.test.com/load/research/compare?submit=true&Actions=ajax&componentID=1600176192830&alias=test-使用机器和子功能=%2f模板%2f内容%2f媒体 至 https://www.test.com/learn/research/detail?submit=true&Actions=ajax&compon
https://www.test.com/load/research/compare?submit=true&Actions=ajax&componentID=1600176192830&alias=test-使用机器和子功能=%2f模板%2f内容%2f媒体
至
https://www.test.com/learn/research/detail?submit=true&Actions=ajax&componentID=1600176192830&alias=test-使用机器和子功能=%2f模板%2f内容%2f媒体
我尝试了多种方法来处理这个问题,但都失败了,下面是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重写工作正常
RewriteCond %{QUERY_STRING} ^(.*&)?submit=true?(&.*)?$ [NC]
RewriteRule ^/load/research/(.*)$ http://localhost:8080/learn/research/detail?submit=true%1%2 [P,L]