0
我想重写我的PHP应用程序的网址,但它不工作。在Apache2网址重写不工作
我的目录结构
/var/www/html/test|
|---.htaccess
|---index.php
我的.htaccess文件内容
# Activates URL rewriting (like myproject.com/controller/action/1/2/3)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
apache2ctl -M
结果:
rewrite_module (shared)
Server版本:阿帕奇/ 2.4.18(Ubuntu的)
我在这个过程中做错了什么?请帮忙
每当我尝试'本地主机/测试/某事/ something_more'它给出错误未找到。不应该重定向到index.php? –
没有错误。但在我的'/ etc/apache2/apache2.conf'中''AccessFileName .htaccess'取消注释 –