使用查询字符串重写apache httpd完整url
我想在httpd.conf中使用下面的代码行,用查询字符串将url从一个应用程序重写到另一个不同路径的应用程序使用查询字符串重写apache httpd完整url,apache,.htaccess,mod-rewrite,Apache,.htaccess,Mod Rewrite,我想在httpd.conf中使用下面的代码行,用查询字符串将url从一个应用程序重写到另一个不同路径的应用程序 RewriteEngine On RewriteRule ^/rforms/jsp/rform/index.jsp?(.*)$ /Project/jsps/rform/indexAIL.jsp?$1 [R] RewriteRule ^/rforms/onlineLandingPage.do?(.*)$ /Project/onlineLandingPage.do?pid=1&lo
RewriteEngine On
RewriteRule ^/rforms/jsp/rform/index.jsp?(.*)$ /Project/jsps/rform/indexAIL.jsp?$1 [R]
RewriteRule ^/rforms/onlineLandingPage.do?(.*)$ /Project/onlineLandingPage.do?pid=1&loginType=2&$1 [R]
url重定向,但找不到查询字符串参数。
请建议。您无法在
重写规则中匹配查询字符串,并且此处不需要匹配查询字符串,因为这将自动进行
请尝试以下规则:
RewriteEngine On
RewriteRule ^/?rforms/jsp/rform/index\.jsp$ /Project/jsps/rform/indexAIL.jsp [NC,R,L]
RewriteRule ^/?rforms/onlineLandingPage\.do$ /Project/onlineLandingPage.do?pid=1&loginType=2 [R,L,NC,QSA]