Previous Thread
Next Thread
Print Thread
Rate Thread
#104066 04/17/2001 11:26 AM
Joined: Oct 2000
Posts: 2,665
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,665
wasn't sure on which forum to post this, so since this is server scripting matter I thought this forum would be best smile

anyway,
I can't get htaccess to deny directory listing. Would anyone have the correct code ?

thanks

Chuck


Do you believe in love at first sight,
or should I walk by again?
Sponsored Links
#104067 04/17/2001 11:37 AM
Joined: Jan 1999
Posts: 568
Moderator / Fish
Moderator / Fish
Offline
Joined: Jan 1999
Posts: 568

Options none


or just drop a blank index.html file in there.

[ April 17, 2001 11:48 AM: Message edited by: Sally ]

#104068 04/17/2001 12:29 PM
Joined: Oct 2000
Posts: 2,665
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,665
tried that but then I get 500 errors on my scripts and can't access the files


Do you believe in love at first sight,
or should I walk by again?
#104069 04/17/2001 12:48 PM
Joined: Jan 1999
Posts: 568
Moderator / Fish
Moderator / Fish
Offline
Joined: Jan 1999
Posts: 568
hmmm, not sure why it's doing that.

For now I suggest you just drop the empty index.html in there.

#104070 04/17/2001 12:54 PM
Joined: Oct 2000
Posts: 2,665
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,665
k thanks anyway


Do you believe in love at first sight,
or should I walk by again?
Sponsored Links
#104071 04/17/2001 5:55 PM
Joined: Mar 2000
Posts: 615
Member
Member
Offline
Joined: Mar 2000
Posts: 615
a. I think you can do
Options -Indexes

b. 500 ISE's can also mean an error in .htaccess

my guess is that because 'ExecCGI' is one of the 'options', the fact that you don't have that doesn't let you execute CGI scripts?

#104072 04/24/2001 10:09 PM
Joined: Mar 2001
Posts: 25
Junior Member
Junior Member
Offline
Joined: Mar 2001
Posts: 25
Code
quote:</font><HR>Originally posted by JohnM:

my guess is that because 'ExecCGI' is one of the 'options', the fact that you don't have that doesn't let you execute CGI scripts?
<HR></BLOCKQUOTE>
Thats exactly it. Here is how you do it. :)

<BLOCKQUOTE><font size="1" face="Verdana, Helvetica, Arial">code:

#104073 04/25/2001 4:58 AM
Joined: Oct 2000
Posts: 2,665
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,665
thanks I'll give it a try smile


Do you believe in love at first sight,
or should I walk by again?
#104074 04/26/2001 6:50 PM
Joined: Feb 2001
Posts: 78
Member
Member
Offline
Joined: Feb 2001
Posts: 78
First, create the HTML page you want to use as your error message.
Second, upload it to your web directory [/home/$user/$domain-www].
Third, go into your .htaccess file (or create one) and add lines which specify the substitution.

Here are three examples of specifying error documents which will be called for a given error condition (note you can use relative or absolute addressing):

ErrorDocument 401 http://domain.com/nopasswd.html
ErrorDocument 403 /forbidden.html
ErrorDocument 404 http://www.domain.com/nofile.html

#104075 04/26/2001 6:54 PM
Joined: Mar 2000
Posts: 615
Member
Member
Offline
Joined: Mar 2000
Posts: 615
a) he doesn't want to use custom error messages, but to deny directory listings tipsy

b) /home/$user/$domain-www is on Alabanza servers. not all servers use that directory structure.

Sponsored Links
#104076 04/26/2001 10:45 PM
Joined: Feb 2001
Posts: 78
Member
Member
Offline
Joined: Feb 2001
Posts: 78
sorry, copied and pasted the wrong one. Just change the /home/$user to whatever yours is but this is how mine works.

-----------------------

The directory you want protected must have a .htaccess file in it that looks like the following (do not put the comments in the actual .htaccess file [comments begin with #]):

AuthUserFile /home/$user/.passwd
AuthGroupFile /home/$user/.group
AuthName "Protected Space"
AuthType Basic

require group $users #users, is the group of users that you give access to
#require user $user #if there is only one user in the group, you can substitute this line; remove the #.


(Other possible groups are administrators, etc)

Groups and users are stored in the .group file, and passwords are stored in .passwd. The .htaccess file looks for these files in the /home/$user directory. Do not attempt to edit these manually! Use the Control Panel function 'Protect Directories' to edit these files for you. With this function you can select the directory to be protected, then add users and their passwords that will have access. -----------------------------------------

#104077 04/27/2001 4:38 AM
Joined: Oct 2000
Posts: 2,665
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,665
FDSA, I tried your code, it works well but I still have a problem, SSI is not parsed anymore, would you know which tag I need to add ?

wnxwakko, thanks for the help but I am not trying to protect a directory smile


Do you believe in love at first sight,
or should I walk by again?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 2338
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 24
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)