Solved

Special .htacces for 20 users

Posted on 1997-05-27
1
139 Views
Last Modified: 2013-12-25
Hi,

I want know if someone can help me, I want to put a .htacces on my page and I want a special thing for it, look:

The system I want is a acces control that will ask user a password and a username that I configure (and also I can modify) for each user (a different for each user) and I want to, if they put the rigth password, make them go to a different (ex: Barney wrote his user name and password correctly, after he go to a special page that I make only for him, EX: "barney.html" and bob do the same with his password and user name and go to another page) page for each password (a page that I make for THIS user). Twenty will be around my max user for this (so I can create the 20 page). This because they will have acces to a CGI script that make them upload in my anon. FTP and each user must upload in a different dir and have different instructions to read (I must do a CHMOD for this CGI, but I know how).

This is my little problem, my web server say that it will be too much programation. And they run with the Unix and there web server is the latest Apache (they support all the perl).

Thanks!
0
Comment
Question by:internouille
1 Comment
 
LVL 5

Accepted Solution

by:
icd earned 120 total points
ID: 1828109
I will make two assumptions here.
1. you know how to set up and modify the .htaccess files
2. you know how to write perl scripts.

If either of these assumptions are wrong then I will elaborate in more detail.

First of all create a new sub-directory off your cgi-bin directory, say 'members' and secure it with the .htaccess method so that only your 20 or so users can access it.

You don't need 20 different files, you only need one script, say 'login.pl' and within this script you would determine which of the 20 users was accessing the page by referring to the environment variable 'REMOTE_USER'. You can then tailor the page to suit the user. Of course if you really wanted 20 different files then the script would be simple, it would just open the relevent file and output it directly to stdout.

The URL that they would access would then be:-

http://www.yourdomain.com/cgi-bin/members/login.pl


0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now