Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


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

Rep: Reputation: 0
Help with Apache and .htaccess

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


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
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:57 PM.

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