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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

htaccess

Status
Not open for further replies.

antdickens

Programmer
Nov 13, 2001
129
GB
Not sure if this is the correct group!!

I have used htaccess to restrict access to certain directories within my website.


When a user has logged in then tries to access a different part of the site which i do not want him to access it prompts him to enter a password. It it possible to just get it to go to the error page.

 
Well, at least not with the standard mod_auth.

You could use mod_python or something similar to intercept the auth events and write your own rules to do whatever you want. If you're interested I can point to some howtos and give you some example code I've written.

Once you get it installed and understand a couple of basic concepts it's pretty easy and *extremely* powerful.
 
do you mean restrict access to that portion of the site completely to the world - I don't understand your question


%, 2004
 
Not sure if I understood the question, but here is my stab at it.

You could do an deny from all, allow from ...

Awfully hackish, and ericbrunson's way is probably better, but that's my suggestion.

----------------------------
"Security is like an onion" - Unknown
 
if that is the deal then you could just use chmod 700

%, 2004
 
Isn't this just a directory permission thing?

I've seen plenty of times when surfing the net, that if you try to move down the tree, you get a 403 error - permission denied. You can presumably set a custom 403 page, either with what you want to say, or a redirect.

And don't ask me for an example, I've, um, forgotten which webite it was I was trying to find more directories in. Ahem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top