gpt4 book ai didi

apache - mod_rewrite 不作为内部代理工作

转载 作者:可可西里 更新时间:2023-11-01 17:04:15 25 4
gpt4 key购买 nike

我有一个站点需要使用 mod_rewrite 通过内部代理将访问 www.example.com 的流量定向到 123.45.67.89,端口 8080。这是我正在使用的重写规则:

RewriteEngine On
RewriteRule ^(.*)$ http://123.45.67.89:8080/$1 [P]

当我访问 www.example.com/myurl 时,我收到以下 404 错误:

The requested URL /myurl was not found on this server.

此重定向适用于我们的开发服务器,但不适用于生产服务器。是否需要启用 Apache 设置才能使其正常工作?

谢谢

最佳答案

你需要有 mod_proxy启用使用 P flag .

关于apache - mod_rewrite 不作为内部代理工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1173571/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com