apache2开启rewrite URL重写功能
首先在linux执行下面命令,开启rewrite模块:
sudo a2enmod rewrite
然后编辑apache2 站点配置文件:
sudo vi /etc/apache2/sites-enabled/000-default.conf
添加以下内容:
<Directory /var/www/html>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
评论已关闭