<tfoot id='zi0W4'></tfoot>

    <small id='zi0W4'></small><noframes id='zi0W4'>

  1. <legend id='zi0W4'><style id='zi0W4'><dir id='zi0W4'><q id='zi0W4'></q></dir></style></legend>

      <i id='zi0W4'><tr id='zi0W4'><dt id='zi0W4'><q id='zi0W4'><span id='zi0W4'><b id='zi0W4'><form id='zi0W4'><ins id='zi0W4'></ins><ul id='zi0W4'></ul><sub id='zi0W4'></sub></form><legend id='zi0W4'></legend><bdo id='zi0W4'><pre id='zi0W4'><center id='zi0W4'></center></pre></bdo></b><th id='zi0W4'></th></span></q></dt></tr></i><div id='zi0W4'><tfoot id='zi0W4'></tfoot><dl id='zi0W4'><fieldset id='zi0W4'></fieldset></dl></div>
        <bdo id='zi0W4'></bdo><ul id='zi0W4'></ul>
    1. 非常奇怪的 Drupal 7 404 行为

      时间:2023-06-22
    2. <legend id='LqEwx'><style id='LqEwx'><dir id='LqEwx'><q id='LqEwx'></q></dir></style></legend>
            • <bdo id='LqEwx'></bdo><ul id='LqEwx'></ul>
              <i id='LqEwx'><tr id='LqEwx'><dt id='LqEwx'><q id='LqEwx'><span id='LqEwx'><b id='LqEwx'><form id='LqEwx'><ins id='LqEwx'></ins><ul id='LqEwx'></ul><sub id='LqEwx'></sub></form><legend id='LqEwx'></legend><bdo id='LqEwx'><pre id='LqEwx'><center id='LqEwx'></center></pre></bdo></b><th id='LqEwx'></th></span></q></dt></tr></i><div id='LqEwx'><tfoot id='LqEwx'></tfoot><dl id='LqEwx'><fieldset id='LqEwx'></fieldset></dl></div>

                <tbody id='LqEwx'></tbody>

              <tfoot id='LqEwx'></tfoot>
              • <small id='LqEwx'></small><noframes id='LqEwx'>

                本文介绍了非常奇怪的 Drupal 7 404 行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我在 D7 中有一些我以前从未见过的非常奇怪的行为.我已将一个新站点从我的开发机器迁移到测试机器,因此代码和数据库是相同的.在开发机器(Ubuntu 13.04、Apache、PHP 5.5.3)上,一切正常,但在 Raspbian 上运行 PHP 5.4.4 的 Raspberry Pi 测试盒上,我似乎在提交表单时遇到 404 错误.似乎发生的情况是,当您查看 HTTP 响应时,未处理表单并返回原始页面,但带有 404 状态代码.

                这会影响使用 POST 的所有内容,包括登录.我确实通过使用 Firefox 的 Web 开发人员工具将登录表单的action"属性更改为指向/",设法让它登录,但许多其他事情不起作用,管理菜单偶尔会消失.

                认为这可能是缓存问题,因此手动截断了所有缓存表,但这没有任何区别.一个不存在的临时文件夹似乎有问题,所以我创建了一个它期望的 777 perms(因为我无法更改设置,因为表单提交不起作用......)但不是这个任何一个.干净的网址工作正常.

                以前从未见过这样的事情.任何想法最受赞赏!

                解决方案

                这似乎是这个问题的答案(摘自问题下方 OPer 的评论):

                <块引用>

                我忘记启用 mod_rewrite 和 mod_headers!让我感到惊讶的是,没有它们,干净的 URL 也能正常工作.我认为这是因为 .htaccess 将 404s 指向 Drupal,然后 Drupal 将解释请求的 URL 并显示适当的页面,但当然 Apache 发送的是 404 标头.

                I am having some very strange behaviour in D7 that I have not seen before. I have migrated a new site from my dev machine to a test machine, so code and DB are identical. On the dev machine (Ubuntu 13.04, Apache, PHP 5.5.3), everything works fine, but on the test box which is a Raspberry Pi running PHP 5.4.4 on Raspbian, I seem to get 404 errors on form submission. What seems to happen is that the form is not processed and the original page is returned but with a 404 status code when you look at the HTTP response.

                This is affecting everything that uses POST, including login. I did manage to get it to log in by changing the 'action' attribute of the login form to point to '/' using Firefox's web developer tools, but lots of other things didn't work and the admin menu occasionally disappeared.

                Thought it might be a caching issue so manually truncated all the cache tables but that made no difference. There appeared to be an issue with a non-existent temp folder so I created the one it was expecting with 777 perms (as I couldn't change the setting because form submission wouldn't work...) but it wasn't this either. Clean URLs are working fine.

                Never seen anything like this before. Any ideas most appreciated!

                解决方案

                Here is what seems to be the answer to this question (taken from a comment from OPer below the question):

                I'd forgotten to enable mod_rewrite and mod_headers! What I was amazed about was that clean URLs were working at all without them. I think this is because .htaccess points 404s to Drupal, which will then interpret the requested URL and show the appropriate page, but of course Apache is sending a 404 header.

                这篇关于非常奇怪的 Drupal 7 404 行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:在 drupal 中使用 hook_form_alter 设置 webform 组件值 下一篇:drupal 使用 include 分隔模板代码页眉和页脚

                相关文章

              • <small id='ZK9eX'></small><noframes id='ZK9eX'>

                1. <i id='ZK9eX'><tr id='ZK9eX'><dt id='ZK9eX'><q id='ZK9eX'><span id='ZK9eX'><b id='ZK9eX'><form id='ZK9eX'><ins id='ZK9eX'></ins><ul id='ZK9eX'></ul><sub id='ZK9eX'></sub></form><legend id='ZK9eX'></legend><bdo id='ZK9eX'><pre id='ZK9eX'><center id='ZK9eX'></center></pre></bdo></b><th id='ZK9eX'></th></span></q></dt></tr></i><div id='ZK9eX'><tfoot id='ZK9eX'></tfoot><dl id='ZK9eX'><fieldset id='ZK9eX'></fieldset></dl></div>
                  1. <tfoot id='ZK9eX'></tfoot>
                    <legend id='ZK9eX'><style id='ZK9eX'><dir id='ZK9eX'><q id='ZK9eX'></q></dir></style></legend>

                      <bdo id='ZK9eX'></bdo><ul id='ZK9eX'></ul>