0

我正在尝试使用 Openfire 服务器运行iJab,这需要我将 /http-bind 请求重定向到 localhost:7070/http-bind。我将 iJAb 文件夹复制到我的文档根目录中,并在目录中的 .htaccess 文件中编写了以下代码

    AddDefaultCharset UTF-8
    Options +FollowSymLinks
    Options +Indexes
    Options +MultiViews
    RewriteEngine On
    RewriteRule /http-bind/ http://localhost:7070/http-bind/ [P]

在 httpd.conf 中,它的 AllowOverride all

但是当我运行它时,它给出了错误 .. 用户名或密码错误,但 firebug 控制台在 ajax 发布请求上显示 404 错误

http://localhost/http-bind
. 所以我怀疑它是否被重定向。有什么方法可以检查是否实际使用了 htaccess?

另外,我没有使用任何虚拟主机,apache 服务器和 openfire 服务器的服务器名称都是 localhost,地址是 127.0.0.1。我让它成为这样,因为 openfire 管理员在 9090 端口上完美运行,而 http-bind 的端口是 7070

这可能是原因吗?

寻找一些想法

4

3 回答 3

1

如果是 .htaccess,您需要从模式中删除本地路径前缀:

RewriteRule ^http-bind(/.*)?$ http://localhost:7070/http-bind/ [P]
于 2010-02-11T14:07:40.157 回答
0

The rule you're using has a slash at the end, but the URL you're using doesn't.

于 2010-02-11T14:09:15.893 回答
0

http 绑定的链接应该放在示例文件夹的索引文件中,而不是放在 htaccess 文件中,如下面的片段所示。htaccess 文件并没有真正被访问。希望这会有所帮助

$(document).ready(function() {
    Candy.init('http://bosh.metajack.im:5280/xmpp-httpbind/', {
    core: {
        // only set this to true if developing / debugging errors
        debug: true,
        // autojoin is a *required* parameter if you don't have a plugin (e.g. roomPanel) for it
        //   true
        //     -> fetch info from server (NOTE: does only work with openfire server)
        //   ['test@conference.example.com']
        //     -> array of rooms to join after connecting
        //autojoin: true
    },
    view: { assets: '../res/' }
});
于 2015-02-26T07:07:22.590 回答