ISAPI Rewrite 不会代理根文件夹

发布于 2024-08-19 06:24:13 字数 655 浏览 3 评论 0原文

我不确定这是一个 ServerFault 问题还是 StackOverflow 问题,所以我先在这里问一下。

使用 ISAPI Rewrite (Helion Tech) 时,我似乎无法代理根目录 http://www.somesite.com/

http://www.somesite.com/subdir/ 将在 subdir 为在另一台服务器上,但只是简单的旧“/”将不起作用。

这是我的 .htaccess 的副本

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.69

RewriteEngine on
RewriteBase /

RewriteRule (.+) http://internalsite/$1 [P]

<Helicon>
ProxyConnectTimeout 120
</Helicon>

内部站点中没有默认文档,因为它使用 mod_rewrite (wordpress)。

I wasn't sure if this is a ServerFault question or StackOverflow, so I am going to ask it here first.

When using ISAPI Rewrite (Helion Tech), I cannot seem to proxy the root directory http://www.somesite.com/

http://www.somesite.com/subdir/ will work if subdir is on the other server, but just plain old '/' will not work.

Here is a copy of my .htaccess

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.69

RewriteEngine on
RewriteBase /

RewriteRule (.+) http://internalsite/$1 [P]

<Helicon>
ProxyConnectTimeout 120
</Helicon>

There is no default document in the internalsite, as it uses mod_rewrite (wordpress).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乖乖 2024-08-26 06:24:13

但是普通的“/”不起作用

这可能是因为您有 RewriteBase 切断了斜杠,然后 (.+) 不匹配,因为您没有更多字符。请尝试像这样修复您的配置:

RewriteEngine on
RewriteBase /

RewriteRule (.*) http://internalsite/$1 [P]

but just plain old '/' will not work

This may be because you have the RewriteBase cutting off the slash and then (.+) doesn't match as you have no more characters. Please try to fix your config like this:

RewriteEngine on
RewriteBase /

RewriteRule (.*) http://internalsite/$1 [P]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文