今天在linux环境下折腾项目时候,发现即启动了apache2的rewrite功能,并且正常书写了.htaccess 但是还是不能隐藏index.php
1
a2enmod rewrite
2
<VirtualHost *:80>
ServerAdmin admin@project.com
ServerName site.dev
ServerAlias site.dev
DocumentRoot /var/www/dev/
<Directory /var/www/dev/>
AllowOverride All
</Directory>
</VirtualHost>
注意!!! AllowOverride All