It is very important part for any web application. At one side, when we are taking care a lot to prevent our code to be copied, why we forget to implement Directory Browsing. At least you can save your client side scripts and images. By implementing this mechanism your application will deny to display js, jquery, stylesheet, image directories or even any directory of application.
Best thing about this mechanism is it’s implementation, it is very easy. Just one line of code, need to be changed or written. It is worth to write.
As much as I know, there are 2 ways you can implement this.
- Update apache server configuration file i.e. httpd.conf
- Update application’s .htaccess file
Update httpd.conf file:
Replace:
Options Indexes FollowSymLinksTo:
Options FollowSymLinksUpdate .htaccess file:
Add below line:
Options -Indexes
That’s all, You are done :)
As much as I know, there are 2 ways you can implement this.
Update httpd.conf file:
Replace:
To:
That’s all, You are done
- See more at: http://blog.trimantra.com/block-directory-browsing-in-php/#sthash.NSIR9Cra.dpuf
- Update apache server configuration file i.e. httpd.conf
- Update application’s .htaccess file
Update httpd.conf file:
Replace:
1
| Options Indexes FollowSymLinks |
1
| Options FollowSymLinks |
Update .htaccess file:
Add below line:
1
| Options -Indexes |
- See more at: http://blog.trimantra.com/block-directory-browsing-in-php/#sthash.NSIR9Cra.dpuf