是否可以在Apache2上传递代理,该代理还携带传递给后端服务器的参数?
示例:
www.frontserver.com -> www.frontserver.com (meaning that on the base directory it will not be proxied to any backend servers.)
如果在/ _nuxt目录下,它将被代理
www.frontserver.com/_nuxt/index.js -> backserver.com/_nuxt/index.js (dynamicaly)
答案 0 :(得分:0)
您可以使用P flag of mod_rewrite来完成此任务:
RewriteEngine On
RewriteRule "^_nuxt/(.*)" "%{ENV:protocol}://backserver.com/_nuxt/$1" [P]
答案 1 :(得分:0)
您可以使用与正则表达式匹配的ProxyPassMatch
ProxyPassMatch "^_nuxt/(.*)" "http://backserver.com/_nuxt/$1"