Changed the AllowOverride to All and still nothing

匆匆过客 提交于 2020-01-03 11:45:12

问题


I tried to write a .htaccess file on my local pc's website,
I've realized I need to set AllowOverride All instead of None searched, found the file /etc/apache2/conf.d/security in the file I found

#<Directory />
#AllowOverride None
#Order Deny,Allow
#Deny from all
#</Directory>

changed it to

<Directory />
    AllowOverride All
    Order Deny,Allow
    Deny from all
</Directory>

typed

service apache2 restart

and... .htaccess still didn't work :I

the file by the way, holds one line, deny from all.


回答1:


Answer from original poster:

Finally found the right place: /etc/apache2/sites-available/default search for the

<directory /var/www/>  part, and changed it to:

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>


来源:https://stackoverflow.com/questions/2999442/changed-the-allowoverride-to-all-and-still-nothing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!