Hello, I am a newbie here.
In other cases my native language is not English, and mostly I use google translate.
What I’m Talking About
To the topic.
Another time, I saw some websites blocking users from accessing the sub folders.
For example:
sofa.my.id/assets/css/style.css
** or
index.html
assets > css > style.css
If I go to the ‘assets’ or ‘css’ folder using the manual url, it will redirect to the 403 page.
But I can still access the style.css
file
Because I am curious and interested to try it. I looked for references and ended up in a directory listing topic. After reading several articles, it was explained that the directory listing can be modified with a file called .htaccess. Then i find out what is .htaccess and how to use it.
Sadly, i don’t understand and can only follow the guide without understanding how it works.
Issue Problems
After searching for a guide on this forum, someone say to add Option -Indexes
to the .htaccess file, then I tried it. But it didn’t work, until now. And I haven’t deleted the script yet.
Not satisfied, I noticed that I can change folder permissions manually. So I did, by changing the code 755 to 403 in all folders.
In hopes can blocking the user from accessing the sub folders.
In fact – yes. But create new problems.
Many functions fail to read the directory. Such as images, icons, etc. Though I didn’t change any permissions on images, icons or similar, and only folder permissions were changed.
Other Information
After all that happened, I calmly returned the permissions code of all folders to normal (755). But still, there are some files that the directory cannot read. So, I rename the file and everything went back to normal. Then I wrote the problem in this forum.
As shown in the title, How to disable access directory listing ? And what must I do now ?
Please someone help ! Thank you