How to make a folder 403

Status
Not open for further replies.

ellescuba27

Member
Messages
273
Reaction score
3
Points
18
How to make a folder Authorized, 403 etc. without all the files in it to have the same error? I have a folder with the background images for the site and I want to make that folder unauthorized or forbidden but I still want the images to show up on the site. I know people can still access the images with right-click, it just seems more professional to have that folder blocked off, everyone does it. Can you do this with .htaccess, php.ini, cPanel...
 

jjordan69

Member
Messages
224
Reaction score
2
Points
18
Try with setting "Hotlink Protection" in cPanel

You can add this to your [ .htaccess ] file

#
# DO NOT SHOW FILES WHEN NO INDEX IS FOUND
Options -Indexes
#
 
Last edited:

ruggiero66

New Member
Messages
11
Reaction score
0
Points
0
Hotlink protection will disallow people from hosting your images on their website through your links.

However, a quick way to block a directory is to check what your directory's default file is - such as index.htm, index.php, or whatever, and create a BLANK TEXT FILE in Notepad or other text editor, and save it as index.htm OR index.html OR index.php - depending on what file you have set as a default. The text file does not HAVE to be blank, as it can have some error message text in it, like "Access Denied!"

Hope that helps!
 

jjordan69

Member
Messages
224
Reaction score
2
Points
18
Hot link protection is pointless with screen snippers.

IMO - you post tells me - you do not know what "Hot link protection" does

and the OP said " I know people can still access the images with right-click"
 

rst101

Member
Messages
44
Reaction score
0
Points
6
IMO - you post tells me - you do not know what "Hot link protection" does

and the OP said " I know people can still access the images with right-click"

Cool story that bro.

Don't concern yourself with what I know and don't know. Even If I didn't know I sure know how to use google, he knows:biggrin:. I was merely stating any image can be copied, after all that is what computers do.
 
Last edited:

ezadx10b

New Member
Messages
29
Reaction score
0
Points
1
Use index.php and copy this..

<?php

$url = '../';
header( 'Request-URI: '.$url );
header( 'Content-Location: '.$url );
header( 'Location: '.$url );
exit();
?>

Or use .htaccess and use this code

Order Deny,Allow
Deny From All

#:redface::redface::redface:
 

ezadx10b

New Member
Messages
29
Reaction score
0
Points
1
Thanks for all the options. I will try those and see which works best!

If u want to disable right click to disable user "save images as" use this code
<script src="http://www.ezad.x10.bz/_notes/noclick.js?=76634" type="text/javascript"></script>
 

jjordan69

Member
Messages
224
Reaction score
2
Points
18
If u want to disable right click to disable user "save images as" use this code
<script src="http://www.ezad.x10.bz/_notes/noclick.js?=76634" type="text/javascript"></script>

Users know to get around that they turnoff 'Javascript' in their browser - other use addons like 'Web Developer'
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
How to make a folder Authorized, 403 etc. without all the files in it to have the same error? I have a folder with the background images for the site and I want to make that folder unauthorized or forbidden but I still want the images to show up on the site. I know people can still access the images with right-click, it just seems more professional to have that folder blocked off, everyone does it. Can you do this with .htaccess, php.ini, cPanel...

You never clearly state what you want.

Do you want mysite.com/images/ to give a 403 error while mysite.com/images/logo.png displays normally?

Or what?
 
Status
Not open for further replies.
Top