【问题标题】:Apache not using mod_rewrite.cApache 不使用 mod_rewrite.c
【发布时间】:2009-02-28 01:38:28
【问题描述】:

所以我只是用 debian、apache 等设置了一个 linode 服务器,现在我正在尝试让我正在开发的应用程序运行,但它需要 mod_rewrite.c。所以很自然地,我去了应用程序的目录(如果重要的话,恰好在 PHP 中)并在其中创建了一个 .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
</IfModule>

所以我转到我的域example.com/hello,它给了我一个 404 错误,它应该向我显示 index.php 加载的内容。 mod_rewrite.c 不工作有什么原因吗?

【问题讨论】:

  • 您可以尝试删除 行,看看 Apache 是否无法正确识别模块。

标签: php apache debian


【解决方案1】:

模块是否在 /etc/apache2/mods-enabled 中启用?

【讨论】:

    猜你喜欢
    • 2013-11-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-12
    • 1970-01-01
    • 1970-01-01
    • 2018-11-05
    相关资源
    最近更新 更多