Solved

Special .htacces for 20 users

Posted on 1997-05-27
1
138 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

771 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

11 Experts available now in Live!

Get 1:1 Help Now