title: how to prevent directory access and show forbidden error in php
body: <ol>
  <li><p>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 show forbidden message.</p></li>
  <li><p>currently i've put index.php in every folder of my website and echo the messages is it good way to do it.</p></li>
  <li><p>when i access my website like www.mycart/index.php/css or www.mycart/index.php/images it show website without images and css why and how to fix it?</p></li>
  </ol>