1

我需要将以下重写规则与 proxyPass 和 proxyPassReverse 一起使用

RewriteEngine On
RewriteRule  ^(market|stock|mutual)$ stackoverflow/$1 [L]

我的虚拟主机定义是

<VirtualHost *>
    ServerName localhost
    ProxyPass / http://localhost:8080/ 
    ProxyPassReverse / http://localhost:8080/  
</VirtualHost>

我应该在哪里插入重写规则,以便当我点击 URL -- localhost/market 时,它将对 localhost:8080/stackoverflow/market 执行内部重写

请帮忙

4

1 回答 1

2

知道了

<VirtualHost *>
    ServerName localhost
    ProxyPass / http://localhost:8080/stackoverflow/ 
    ProxyPassReverse / http://localhost:8080/stackoverflow/ 
    RewriteEngine On
    RewriteRule  ^(market|stock|mutual)$ stackoverflow/$1 [L]
</VirtualHost>
于 2013-03-14T07:47:56.733 回答