【发布时间】:2016-07-26 17:14:02
【问题描述】:
我正在尝试解决我关于如何在 apache 2.4.6 上启用 mod_rewrite 模块的问题。我测试了一些我能找到的解决方案,但在我看来它不起作用。顺便说一句,我正在使用这个 .htaccess 配置:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /sats/ <-- name of my codeigniter directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
我似乎仍然找不到启用模组重写的方法。我对 centOS 7 也不太熟悉。我的解决方案之一是将 /etc/httpd/conf/httpd.conf on 中的 AllowOverride None 更改为 AllowOverride All 。我似乎不明白为什么这不起作用。我还在 StackOverflow 上查看了一些解决方案,但它没有用。因此,非常感谢我没有做的任何建议或事情。如果您找到了一些解决方案,我也想尝试一下。谢谢!
【问题讨论】:
标签: .htaccess mod-rewrite httpd.conf codeigniter-3 apache2.4