清理 URL 不起作用,已安装 mod_rewrite 模块 [英] Clean URL's not working, mod_rewrite module installed

查看:25
本文介绍了清理 URL 不起作用,已安装 mod_rewrite 模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了 Drupal 6.19 的全新副本,以快速了解如何编写模块.但由于某种原因,重写模块不适用于 Drupal.

I just installed a fresh copy of Drupal 6.19 to get to speed on how to write modules. But for some reason the rewrite module isn't working for Drupal.

我检查了什么:

  • $ apachectl -M >> 已安装
  • php_info() 在当前服务器上 >> 说还安装了重写
  • 我还仔细检查我的 Drupal 根目录中的 .htaccess 文件文件夹
  • 更新:检查了 httpd.conf 中的 AllowOverride All
  • $ apachectl -M >> it is installed
  • php_info() on current server >> says rewrite is installed also
  • I also double-checked the .htaccess file in my Drupal root folder
  • UPDATE: checked httpd.conf for AllowOverride All

我在这里没有选择.到处看,但 Drupal 设置不允许我启用这些设置,他们的测试只是访问一个站点,如果重写模块在那里,它应该可以工作.

I'm out options here. Looked everywhere but the Drupal settings aren't letting me to enable the settings and their test is simply visiting a site that should work if the rewrite module was there.

我的规格:Mac OS X 10.6 雪豹在 PHP5 中使用内置的 Apache

My specs: Mac OS X 10.6 Snow Leopard Using built-in Apache with PHP5

谢谢!

推荐答案

还有两点需要检查:

  1. 验证您的 .htaccess 对您的 apache 进程是否可读(是的,我读到您仔细检查了它,但是否包括文件权限?)
  2. 启用重写日志 - 这可能会给你一些提示在它失败的地方.从 日志级别 5 开始,然后根据需要增加/减少.(不要忘记稍后再次关闭它,因为它是一个巨大的性能猪;)
  1. Verify that your .htaccess is readable for your apache processes (Yes, I read that you double checked it, but did that include the file permissions?)
  2. Enable rewrite logging - this might give you some hints on where it fails. Start with a log level of 5 and increase/decrease as needed. (Don't forget to turn it off again later, as it is a huge performance hog ;)

此外,我会尝试简化测试场景 - 从 vhost 配置中的简单重写指令开始.一旦成功,将其移动到 vhosts 文档根目录顶层的 .htaccess,然后移动到子目录(如果需要/使用).

Also, I'd try to simplify the test scenario - start with a simple rewrite directive in a vhost configuration. Once that works, move it to a .htaccess in the top-level of the vhosts document root, then to sub directories (if needed/used).

这篇关于清理 URL 不起作用,已安装 mod_rewrite 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆