How to Set AllowOverride all

前端 未结 11 1564
忘掉有多难
忘掉有多难 2020-11-22 10:17

I want to set the AllowOverride all But I don\'t know how to do it. I have found the following code by searching the google and pasted it in .htaccess

11条回答
  •  深忆病人
    2020-11-22 11:11

    In case you are on Ubuntu, edit the file /etc/apache2/apache2.conf (here we have an example of /var/www):

    
            Options Indexes FollowSymLinks
            AllowOverride None
            Require all granted
    
    

    and change it to;

    
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
    
    

    then,

    sudo service apache2 restart
    

    You may need to also do sudo a2enmod rewrite to enable module rewrite.

提交回复
热议问题