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


- 如何定位 php.ini 文件 (xampp) 2022-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- Laravel 仓库 2022-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01