LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-17-2005, 05:20 AM   #1
spud
LQ Newbie
 
Registered: Oct 2004
Posts: 19

Rep: Reputation: 0
Help with Apache and .htaccess


Hi
Can anyone tell me if there is a way of restricting the links available using .htaccess.

ie

User A logs on and gets Link1 - Link2 - Link3
User B logs on and gets Link1 - Link2
User C logs on and gets Link1 - Link3
User D in same group as User A so gets same links

Sorry but thats the best way i can explain it.

Hope someone can help
 
Old 03-17-2005, 11:52 AM   #2
TheLinuxDuck
Member
 
Registered: Sep 2002
Location: Tulsa, OK
Distribution: Slack, baby!
Posts: 349

Rep: Reputation: 33
My understanding of how it works, this kind of thing is not possible. However, with a little creativity, you can work around it.

One solution would be to have users log in via group names, and not user names. Then, the root web page will have all the links available. And under each link dir, an .htaccess file will exist that will list all the groups who have valid access. If they have already logged in once, then that htaccess should recognize this and not bother asking for a password again. This would, though, require all link dirs available.

Your absolute best bet is a script, though. The script examines the HTTP header and looks for the username, then determines which group they're in and then displays all applicable links.

That is what I would suggest.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache and .htaccess jamluv Linux - Security 9 06-03-2005 02:53 PM
Apache/2.0.51 .htaccess 2782d4 Linux - Software 2 02-08-2005 12:12 PM
apache .htaccess linuxanswer Linux - General 1 05-01-2004 04:20 PM
apache .htaccess emetib Linux - Software 4 09-22-2003 06:50 AM
is htaccess on apache 2.0 not the same as in 1.3 abd_bela Linux - General 3 07-23-2003 05:17 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration