简体   繁体   中英

htaccess not working in sub-directory

i have a vhosts in ubuntu, i work fine except the .htaccess in a sub-folder (images folder) is not work.

The problem is, I have written a .htaccess file in the sub-folder, and even I typed some thing wrong syntax .htaccess, it does not response error,i am pretty sure that the .htaccess in subfolder is being ignored. i think that some setting is needed to let apache beware of the .htaccess in sub-folder, any one can help?

my system is ubuntu

Check in the server/vhost config and look for a <Directory> container that your images folder is in (or is your images folder), something maybe like:

<Directory "/var/www/vhost/images">

</Directory>

and inside it, make sure there isn't a:

AllowOverride None

Change that to either "All" or "FileInfo", depending on what exactly you're overriding in your htaccess file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM