开发者

apache mod_rewrite mod_proxy subdomain to dir

i have a domain www.example.com as front end, and i have many servers having front end servers like games.example.com what i want www.example.com in the background will access games.example.com

so games.example.com = www.example.com/games

this code will handle any access to directory /games will access the backend server

<Location  /games>
ProxyPassReverse games.example.com
ProxyPassReverse games.example.com:80
RewriteEngine On
RewriteRule games(.*)$ http://games.example.com/$1开发者_如何学C [QSA,P,L]
</Location>

it's working but its giving me this url www.example.com/web/login.php which will raise 404 page not found how can i append word games in any URL by being like this www.example.com/games/web/login.php ?


<Location  /games>
ProxyPassReverse games.example.com
ProxyPassReverse games.example.com:80
RewriteEngine On
RewriteRule games(.*)$ http://games.example.com/games/$1 [QSA,P,L]
</Location>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜