Jump to content

Archived

This topic is now archived and is closed to further replies.

JRS

How to stop files from being listed

Recommended Posts

Hello,

Is there a way to stop all the files from being listed if an invalid file name is entered?

For example I have
www.mysite.com/scripts/main.php

If I type in : www/mysite.com/scripts/

Then all the files in that directory are displayed to end user.

Is there a way I can prevent all the files from being displayed to the user?

Thanks in advance
JRS

Share this post


Link to post
Share on other sites
Or add a .htaccess file in to the scripts folder and add the followingto the htaccess file:
[code]Options -Indexes[/code]
When you go to the scripts folder the user will get the [b]403 Forbidden[/b] error message

Share this post


Link to post
Share on other sites
alpine, wildteen88

Thank you very much for your suggestions. It was a great help.
This one is solved!
JRS

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.