Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect or DirectoryIndex?

Status
Not open for further replies.

PaulHSH

ISP
Mar 14, 2002
1
US
I want to disallow directory browsing (e.g. /home/user/foo/) with something more than a 403 error. I have tried editing httpd.conf to send the Web browser to a document which is not in the current directory, but one level higher (e.g. /home/user/readme.html).

Attempting to use a Redirect simply turns away all requests for that directory, unless my syntax is wrong:

Redirect /foo/
I presume that there is a way, but that I'm not seeing it. Assuming I (newbie that I am) explained myself satisfactorily, is there a solution? Thanks in advance.
 
I may be wrong, but I think this should be a parameter
set by your web server. You may want to find out
what web server your are using and check the
documentation and post in the forum for that web server.

Robert Robert G. Jordan

Robert@JORDAN2000.com
Unix Sys Admin
Chicago, Illinois U.S.A.
[lightsaber]
 
Hi Paul.

you can actually specify the contents of Any error mesg. in apache with a line in the httpd.conf file like this...


ErrorDocument 403

This can also be path relative to your domain like this...


ErrorDocument 404 /missing.html



Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top