有没有办法将URL代理到apache中的另一个端口? 例如,我想(反向)代理URL:
http://*.localhost/engine.io/?EIO=2&transport=polling
从端口80到端口8080而不更改url:
http://*.localhost:8080/engine.io/?EIO=2&transport=polling
谢谢!
答案 0 :(得分:1)
在*.localhost
(端口80)虚拟主机中,添加:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(.*)$
RewriteRule ^/engine\.io/$ http://%1:8080/engine.io/?%{QUERY_STRING} [L,P]