views:

24

answers:

0

Hi and thank you for wanting to help :)

I have root access to an Apache server running under CentOS 5. The root site is password protected and some areas of the site (documents etc) can only be accessed by some users. The user id is stored in a session.

In the perfect world I would want to activate a Python script (on the server outside of the root website) everytime a visitor goes to a URL on the site. The script checks the URL and the session's contents and decides whether or not the user may proceed to view the document. If not, the user is redirected to another area of the site. If he can, the document (image, html-file, php-file or whatever) is shown to him.

Can something similar to this be done?

Thank you!

Christoffer