Apache重写未开启,导致The requested URL /xxxx.html was not found on this server

ubuntu中Apache2开启重写模式

2017年07月02日 22:45:18

阅读数:2846

一、首先执行

第一种方式:

sudo a2enmod rewrite

不行的话

第二种方式:

sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load

是在 /etc/apache2/mods-enabled 这个目录下面建立了一个链接

三、需要修改

sudo vi /etc/apache2/sites-enabled/000-default 中的配置项

将其中的 AllowOverride None 修改为 AllowOverride All

Apache重写未开启,导致The requested URL /xxxx.html was not found on this server

最后重启apache就OK了

sudo service apache2 restart