我将AllowOverride None
更改为AllowOverride All
。我在终端中执行了a2enmod rewrite
并重新启动了apache2 ...但我的.htaccess
文件无法正常工作。
命令a2enmod rewrite
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Order allow,deny
deny from all
</Directory>
我的.htaccess
文件:
order deny,allow
deny from all
命令:
service apache2 restart