本文介绍了清洁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()当前服务器上>>的说重写还安装

  • 我也中的的.htaccess 文件中的我的Drupal的根文件夹

  • 更新:检查httpd.conf中的AllowOverride全部

  • $ 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雪豹
使用内置的Apache PHP5

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

谢谢!

推荐答案

两件事来检查:


  1. 验证您的的.htaccess 是否可读的Apache进程(是的,我读了你双重检查,但这样做,包括文件的权限?)

  2. - 这可能会给你一些提示在哪里失败。与并增加/减少需要。 (不要忘了以后再关闭它,因为它是一个巨大的性能猪;)

  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 ;)

另外,我会尽量简化测试场景 - 在一个虚拟主机配置一个简单的重写指令启动。一旦这样的作品,将其移动到的.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模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 23:24