Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 25, 2008, 02:06:11 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Protect Directory w/o password  (Read 878 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: 1071


« 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

FrontPage has been discontinued.
If you plan to stay with FrontPage, consider upgrading to FrontPage 2003 now.

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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM