Welcome Guest, Not a member yet? Register   Sign In
How to not get JS, CSS, Image Folder
#1

[eluser]Nguyen Trung[/eluser]
Hi Everybody !

I have 3 folder are Js, Css and Image
I can get Url localhost/project/js/jquery.js
But when i type : 'localhost/project/js' , It shows all .js file.
Let's help me !! I don't want show all file .

Thanks all !!
#2

[eluser]Oscar Dias[/eluser]
One way is to copy the index.html file from the application folder into your folders. It contains:
Code:
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>

<p>Directory access is forbidden.</p>

&lt;/body&gt;
&lt;/html&gt;
So when you go to 'localhost/project/js' it will show 'Directory access is forbidden.'.
#3

[eluser]CroNiX[/eluser]
Or turn directory listing off in your htaccess or server settings
#4

[eluser]Nguyen Trung[/eluser]
Thanks Oscar and CroNix, I have do, they's good!
@CroNiX : Can you tell me understand (sorry i write english so bad.), or give me example code !! Thanks you!
#5

[eluser]Cristian Gilè[/eluser]
http://www.google.it/search?q=prevent+directory+listing+using+.htaccess




Theme © iAndrew 2016 - Forum software by © MyBB