Solved

Special .htacces for 20 users

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to dynamically set the form action using jQuery.

837 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