我试图为我的用例编写重写url。但它不起作用。http重写不起作用
样本用户端URL:
http://frontend1.techdev.local/user1/app/stats/info.png?t=1234
基于请求URI,它需要将请求重定向到不同后端服务器。
例如,
流1: http://frontend1.techdev.local/user1/app/stats/info.png?t=1234 重定向到 http://app1.techdev.local/user1/app/stats/qwezzsdew.png?t=1234
流程2: http://frontend1.techdev.local/user1/app/html5/qweqwrw.png?t=12345 重定向到 http://app1.techdev.local/newuser/app/html5/qweqwrw.png?t=12345
流程3: http://frontend1.techdev.local/usr1/app/code1/123455.png?t=12345 重定向到 http://app1.techdev.local/newuser/app/code1/qweqwrw.png?t=12345
我开始用第一个测试规则,即使那样也不行。
RewriteRule "^/user1/app/stats/(.*)$" "http://app1.techdev.local/user1/app/stats/$1 [L]"
有人可以请这个
您可以启用并发布重写模块的调试日志([RewriteLog和RewriteLogLevel](https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritelog)为Apache 2.2, [ LogLevel](https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html#logging)为apache 2.4)? –
“不工作”是什么意思 - 会发生什么? –