0

有没有办法将 URL 代理到 apache 中的另一个端口?例如,我想(反向)代理 URL:

http://*.localhost/engine.io/?EIO=2&transport=polling

从端口 80 到端口 8080 不更改 url:

http://*.localhost:8080/engine.io/?EIO=2&transport=polling

谢谢!

4

1 回答 1

1

在您的*.localhost(端口 80)虚拟主机中,添加:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(.*)$
RewriteRule ^/engine\.io/$ http://%1:8080/engine.io/?%{QUERY_STRING} [L,P]
于 2013-10-22T19:14:08.117 回答