0
我写在我的Apache2服务器下面的mod_rewrite规则并投入.htaccess文件:的Apache2 mod_rewrite的
Options +FollowSymLinks
Options -Multiviews
RewriteEngine On
RewriteBase /db/
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
我重写模块启用:
root /var/www/db # a2enmod rewrite
Module rewrite already enabled
root /var/www/db # ls -al /etc/apache2/mods-enabled/rewrite.load
lrwxrwxrwx 1 root root 30 Mar 2 13:42 /etc/apache2/mods-enabled/rewrite.load -> ../mods-available/rewrite.load
的.htaccess文件启用apache2.conf
:
AccessFileName .htaccess
当我尝试访问我的重写URL它似乎不工作:
Not Found
The requested URL /db/user/dashboard was not found on this server.
在我的Apache2错误日志:
File does not exist: /var/www/db/user
任何想法?