![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jun 2003
Posts: 1,697
|
I need a HTACCESS pro ! (I pay with paypal)
I need a 15 min job done. I pay 50$ with Paypal.
I don't use epassporte. Always worked like shit and no customer service. What you need to know : 1 - My members section is protected with http authentification. I use htaccess. Here is what I need : I have a flat file of banned usernames located in this directory : /www/path/website/ban.dat In my htaccess file, after the authentication, I need a conditional mod rewrite to look in the ban.dat file... If the username is in the ban.dat file, I need then the user to get redirected here : http://www.domain_name.com/ban.htm?{username} If possible, when the user authenticate, I would prefefer to use my own login page instead of the default pop up window. I want to use strictly http authentication. No cookies. You can reach me here : [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Aug 2004
Posts: 430
|
15 min job? You could have done it by the time you typed this post.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Damn Right I Kiss Ass!
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,397
|
Would make much more sense then to redirect them through your login page which I assume will be in PHP or ASP.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Damn Right I Kiss Ass!
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,397
|
BTW, I just used customer service with Epassporte and I have to say, they have definitely been doing a much better job as of late!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
Add this to the header file after autnetication
Code:
if ( isset( $_SERVER['PHP_AUTH_USER'] ) ) { $banned_users = file( '/www/path/website/ban.dat' ); if ( is_array($banned_users) ) { foreach ($banned_users as $user) { if ( $user == $_SERVER['PHP_AUTH_USER'] ) { header( "Location: http://www.domain_name.com/ban.htm?" . $_SERVER['PHP_AUTH_USER'] ); } } } ![]()
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Jun 2003
Posts: 1,697
|
Quote:
Thanks for the hint ! ![]() But I can allready write in PHP. For some reasons, I need it absolutely in a htaccess file. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
|
You can redirect on specific usernames in htaccess by hard-coding rules for them, but I don't believe htaccess would have a way to read them from a file for this purpose.
__________________
Skype variuscr - Email varius AT gmail |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Aug 2008
Posts: 1,719
|
I've always gone to Ray, creator of Strongbox for help with htaccess stuff.
You can email him at: support AT bettercgi DOT com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
Varius is correct - htaccess cannot prepend/append files, so your only way is to prepend the htaccess file with the list of banned users as this format:
setenvif remote_user "username1" banned setenvif remote_user "username2" banned so that in htaccess, you have something like this: Code:
##BANNED USERS## setenvif remote_user "username1" banned setenvif remote_user "username2" banned AuthName 'My Protected Area' AuthType Basic AuthUserFile /home/var/etc/.htpasswd (or authmysql if you're using that) <Files *> deny from env=banned </Files> ##BANNED USERS## line, you can have a script automatically update your htaccess by replacing ##BANNED USERS## with ##BANNED USERS## setenvif remote_user "username3" banned that should take care of things
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Join Date: Apr 2002
Location: /root/
Posts: 4,997
|
I guess you're looking for RewriteMap
but this can only be used in server config and virtual host directives basically you'd need access to the apache config file. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Join Date: Jun 2003
Posts: 1,697
|
Quote:
Ultimatly, I could use this solution... I'll try to see if it work ! ![]() But I would still prefer to have the banned names in an external flat file. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | |
Confirmed User
Join Date: Jun 2003
Posts: 1,697
|
Quote:
![]() But I really need this to be coded in the htaccess file. And not in apache itself. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Confirmed User
Join Date: Oct 2002
Posts: 3,745
|
[QUOTE=CHMOD;17400259]
If possible, when the user authenticate, I would prefefer to use my own login page instead of the default pop up window. I want to use strictly http authentication./QUOTE] Those are two opposite statements, so both can not be true. I noticed a few other significant misunderstandings in your posts, so you might consider using a professionally designed and very well tested system rather than trying to design this yourself.
__________________
For historical display only. This information is not current: support@bettercgi.com ICQ 7208627 Strongbox - The next generation in site security Throttlebox - The next generation in bandwidth control Clonebox - Backup and disaster recovery on steroids |
![]() |
![]() ![]() ![]() ![]() ![]() |