|
|
#1 |
|
Silver Member
![]() Join Date: May 2009
Posts: 107
|
How can I avoid this in every directory without an index.html file?
http://www.shakeandbake247.com/images/ To David and Mark, of Shake and bake, I hope you dont mind me using this example. You did post your site here looking for help. |
|
|
|
|
|
#2 |
|
Gold Member
![]() Join Date: May 2009
Location: India
Posts: 334
|
Hey..Go to your FTP client, Browse to this folder and change the CHMOD ( permissions ) for the folder to no Read access to public. then on opening in browser it would give error: not authorized to access.
The link: http://www.javascriptkit.com/script/...chmodcal.shtml Shows different values u can use for chmod. regards Joshu |
|
|
|
|
|
#3 |
|
Silver Member
![]() Join Date: May 2009
Posts: 107
|
Thank you.
I dont have any web design training. Just got the software needed and have been slowing learning how to use it. Can you suggest the proper values to use? I have played around with CHMOD already but I wound up denying access to everything within the directory not just to that only level of my site. example: If I changed the permission to for the directory www.site-root.com/image_folder/ every image, site wide, that was stored in that directory was blocked. |
|
|
|
|
|
#4 |
|
New Member
![]() Join Date: May 2009
Posts: 3
|
A very simple way to do this is to create an index.html page in the folder that you want to keep people out of that has a JavaScript re-direct code in it that will redirect to the homepage when the someone types in the url of the folder.
For example, you have www.sitename.com/images. You want to keep someone out of the images folder. With a java script redirect code you can do this easily. It will redirect from www.sitename.com/images to www.sitename.com (your homepage). The code looks like: <script type="text/javascript"> <!-- window.location = "http://www.sitename.com/" //--> </script> Paste this in the head section of the index.html page you create in the folder you wish to block, replacing sitename.com with your URL. (Leave the http://, it is needed to find the site. |
|
|
|
|
|
#5 |
|
Silver Member
![]() Join Date: May 2009
Posts: 107
|
pjm, Great suggestion. Thank you for that code. Putting it someplace safe right now. I have used a similar tech with an index.html that said "click here to return to the home page."
You code is much better tho. Thank you. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|