Mod_rewrite url 不工作
Mod_rewrite url not working
我有一个url
**12.2.2.2:8073/abc=200&&Yr=18&Hr=12&Mi=45&Sec=32**
我想要的是
**10.1.250.153:6180/testapp/rest/?abc=200&&Yr=18&Hr=12&Mi=45&Sec=32**
因此
RewriteEngine On
LogLevel debug rewrite:trace6
ForensicLog "C:\Apache24\logs\forensic.log"
RewriteRule "^/(.+)$" "http://10.1.250.153:6180/testapp/rest/?" [NC,L,P]
ProxyPassReverse "/" "http://10.1.250.153:6180/testapp/rest"
但它不起作用,在 ForensicLog 中 url 是
+4348:5af043cc:0|GET /abc=200&&Yr=18&Hr=12&Mi=45&Sec=32 HTTP/1.1|Host:12.2.2.2:2222%3a8073|Connection:keep-alive|升级-Insecure-Requests:1|User-Agent:Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66. 0.3359.139 Safari/537.36|接受:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8|接受编码:gzip, deflate|接受语言:en-US,en;q=0.9
-4348:5af043cc:0
知道我这里可能做错了什么吗?
尝试使用原始请求:
RewriteCond %{THE_REQUEST} ^\S+\s+/(\S*)
RewriteRule "^" "http://10.1.250.153:6180/testapp/rest/?%1" [P]
我有一个url
**12.2.2.2:8073/abc=200&&Yr=18&Hr=12&Mi=45&Sec=32**
我想要的是
**10.1.250.153:6180/testapp/rest/?abc=200&&Yr=18&Hr=12&Mi=45&Sec=32**
因此
RewriteEngine On
LogLevel debug rewrite:trace6
ForensicLog "C:\Apache24\logs\forensic.log"
RewriteRule "^/(.+)$" "http://10.1.250.153:6180/testapp/rest/?" [NC,L,P]
ProxyPassReverse "/" "http://10.1.250.153:6180/testapp/rest"
但它不起作用,在 ForensicLog 中 url 是
+4348:5af043cc:0|GET /abc=200&&Yr=18&Hr=12&Mi=45&Sec=32 HTTP/1.1|Host:12.2.2.2:2222%3a8073|Connection:keep-alive|升级-Insecure-Requests:1|User-Agent:Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66. 0.3359.139 Safari/537.36|接受:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8|接受编码:gzip, deflate|接受语言:en-US,en;q=0.9 -4348:5af043cc:0
知道我这里可能做错了什么吗?
尝试使用原始请求:
RewriteCond %{THE_REQUEST} ^\S+\s+/(\S*)
RewriteRule "^" "http://10.1.250.153:6180/testapp/rest/?%1" [P]