Solved

Special .htacces for 20 users

Posted on 1997-05-27
1
144 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
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…
The viewer will learn how to count occurrences of each item in an array.

696 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