Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 11:34:52 AM

Pages: [1]   Go Down
  Print  
Author Topic: Protect Directory w/o password  (Read 1298 times)
jukungshokempo
Newbie
*
Offline Offline

Posts: 1


« on: November 02, 2007, 01:51:53 PM »

 Help

I know how to protect a directory with a password but I'd like to be able to deny access to a directory which would immediately render my Error 403 page if the directory name was manually typed in the address bar after my URL. Is this possible?
Logged
Rick_E
Master Jedi
*****
Offline Offline

Posts: 1127


« Reply #1 on: November 02, 2007, 05:25:30 PM »

The Index Manager in cPanel may do what you want as long as you don't have a page named "index.xxx" in the folder. I haven't used the feature, but what it may do is to add a line to the .htaccess file in that folder.

"The index manager will allow you to turn indexes on or off for a directory. If indexes are off, people will not be able to see what files are in a directory that lacks an index file."
« Last Edit: November 02, 2007, 05:27:33 PM by Rick_E » Logged

All the best, Rick E

Search the Microsoft KB for error messages:
http://support.microsoft.com/search/default.aspx?catalog=LCID%3D1033&spid=919&adv=1

Microsoft groups have additional FrontPage assistance:
http://www.microsoft.com/communities
ttremain
Internet Consultant
Pong! (the videogame) Master
*****
Offline Offline

Posts: 23


WWW
« Reply #2 on: January 06, 2008, 03:11:22 AM »


Create a .htaccess file in the folder you wish to protect.

In this file, add the following two lines:

order deny,allow
deny from all

Now nobody can execute ANYTHING directly from this folder, but it can still be used from within
most scripts, like "include" folders.

Logged

Thomas Tremain
Internet Consultant
-------------------
Offline cPanel Backups
Domain Name Registrations
Webhosting Reviews
Pages: [1]   Go Up
  Print  
 
Jump to: