How to protect website from access without authentication?

Shawn Milochik Shawn at milochik.com
Mon Nov 3 10:20:01 EST 2008


This isn't really a Python question -- it's a Web development
question. The easy answer is to just password protect the directory
all the pages are stored in, and require a password. This can be set
up using Apache or IIS.

If what you really meant to ask was how to prevent anyone from
accessing certain functionality, then you should look into using
sessions, and write the pages you're worried about to require an
authenticated session. This is better than the solution above for
several reasons: You can grant different levels of permission to
different users, you can revoke permission from some users while
allowing it for others, and you can allow your users to each have
their own password. Plus, you'll be able to log which user did what.

If this wasn't helpful, please be much more specific in restating your question.

Shawn



On Mon, Nov 3, 2008 at 8:30 AM, Good Z <goodz158 at yahoo.com> wrote:
> Dear All,
>
> We are developing a website and would like to password protect the whole
> site.
>
> If any user visit our site using ip address or using the http link, he/she
> will be asked for login password and then granted the access to whole site
> based on the correct password. Help will be appreciated.
>
> Thank & Regards,
> Mike
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>



-- 
http://i203.photobucket.com/albums/aa74/harrowlawl/sciencevsreligion.jpg



More information about the Python-list mailing list