how to prevent directory access and show forbidden error in php

前端 未结 3 1719
梦谈多话
梦谈多话 2020-12-24 08:31
  1. I am new to .htaccess, i want to know how to use .htacces to prevent direct access via url of my folder e.g. localhost/mycart/images/ OR localhost/mycart/css should

3条回答
  •  失恋的感觉
    2020-12-24 08:56

    If you want to deny access to all files:

    deny from all
    

    If you want to disable directory listing:

    IndexIgnore *
    

提交回复
热议问题