I'm trying to prevent access images folder on my the website with .htaccess here is my folder http://192.168.1.55/onlineshop/images/
Asked
Active
Viewed 481 times
-1
-
Can you elaborate the question? – Codeformer Jun 16 '17 at 05:35
-
how i can prevent access images folder on my the website – AbdeAMNR Jun 16 '17 at 05:37
-
Try this post you will get the answer https://stackoverflow.com/questions/1767785/htaccess-file-options-indexes-on-subdirectories – Pankaj Makwana Jun 16 '17 at 05:39
-
Create .htaccess file in that folder, add this in you file Deny from all – Codeformer Jun 16 '17 at 05:39
3 Answers
0
if .htaccess file is not working than you can add index.html file in your folder with content of forbidden access, while anyone open's that url than index.html file will run. So your folder is prevent from direct use.
Hope this will helps you.

Nirav Joshi
- 2,924
- 1
- 23
- 45
0
create .htaccess file in images folder i.e http://192.168.1.55/onlineshop/images/.htaccess and add below code in .htaccess file
Deny from all

Nadeem Shaikh
- 289
- 2
- 13
0
Create .htaccess in that folder with the following content.
Deny from all

Codeformer
- 2,060
- 9
- 28
- 46
-
-
To show some custom message , Add this in htaccess file: ErrorDocument 403 /path/to/403.html – Codeformer Jun 16 '17 at 05:47
-
That will show content from that HTML file instead of the standard forbidden message. – Codeformer Jun 16 '17 at 05:48
-
Hi @AbdeAMNR if this or any answer has solved your question please consider [accepting it](https://meta.stackexchange.com/q/5234/179419) by clicking the check-mark. This indicates to the wider community that you've found a solution and gives some reputation to both the answerer and yourself. There is no obligation to do this. – Codeformer Jun 16 '17 at 06:14