debian deepin ubuntu 的apache2 正确开启rewrite

前端之家收集整理的这篇文章主要介绍了debian deepin ubuntu 的apache2 正确开启rewrite前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

今天在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

原文链接:https://www.f2er.com/ubuntu/353563.html

猜你在找的Ubuntu相关文章