0
有沒有辦法將URL代理到另一個端口在Apache? 比如我想(扭轉)代理網址:代理端口,而不更改apache的URL
http://*.localhost/engine.io/?EIO=2&transport=polling
從80端口到端口8080不改變網址:
http://*.localhost:8080/engine.io/?EIO=2&transport=polling
謝謝!
有沒有辦法將URL代理到另一個端口在Apache? 比如我想(扭轉)代理網址:代理端口,而不更改apache的URL
http://*.localhost/engine.io/?EIO=2&transport=polling
從80端口到端口8080不改變網址:
http://*.localhost:8080/engine.io/?EIO=2&transport=polling
謝謝!
在你*.localhost
(80端口)的虛擬主機,添加:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(.*)$
RewriteRule ^/engine\.io/$ http://%1:8080/engine.io/?%{QUERY_STRING} [L,P]
@kamylko您不能使用'ServerName'通配符,你需要'ServerAlias'。請參閱:http://httpd.apache.org/docs/2.2/vhosts/name-based.html –
我擔心這些重寫條件不知何故干擾了Zend項目.htaccess或其他。 – Kamil