Apache not using mod_rewrite.c(Apache 不使用 mod_rewrite.c)
问题描述
所以我只是用 debian、apache 等设置了一个 linode 服务器,现在我正在尝试让我正在开发的应用程序运行,但它需要 mod_rewrite.c
.所以很自然地,我去了应用程序的目录(如果重要的话,恰好在 PHP 中)并在其中创建了一个 .htaccess:
So I just setup a linode server with debian, apache, etc. and now I'm trying to get an app that I'm developing running, but it requires mod_rewrite.c
. So naturally, I went to the directory of the application (happens to be in PHP if that matters) and created a .htaccess with this inside of it:
<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
不起作用有什么原因吗?
So they I headed over to my domain, example.com/hello
, and it gave me a 404 error, when it should be showing me the content that index.php loads. Is there any reason why mod_rewrite.c
wouldn't be working?
推荐答案
模块是否在/etc/apache2/mods-enabled 中启用?
Is the module enabled in /etc/apache2/mods-enabled?
这篇关于Apache 不使用 mod_rewrite.c的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Apache 不使用 mod_rewrite.c


基础教程推荐
- 使用 scandir() 在目录中查找文件夹 (PHP) 2022-01-01
- php中的PDF导出 2022-01-01
- PHPUnit 的 Selenium 2 文档到底在哪里? 2022-01-01
- 将变量从树枝传递给 js 2022-01-01
- 主题化 Drupal 7 的 Ubercart “/cart"页 2021-01-01
- 如何在数学上评估像“2-1"这样的字符串?产生“1"? 2022-01-01
- Yii2 - 在运行时设置邮件传输参数 2022-01-01
- Web 服务器如何处理请求? 2021-01-01
- php中的foreach复选框POST 2021-01-01
- php 7.4 在写入变量中的 Twig 问题 2022-01-01