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


基础教程推荐
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 如何替换eregi() 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01