![]() |
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] |
15 min job? You could have done it by the time you typed this post.
|
Would make much more sense then to redirect them through your login page which I assume will be in PHP or ASP.
|
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!
|
Add this to the header file after autnetication
Code:
if ( isset( $_SERVER['PHP_AUTH_USER'] ) ) { |
Quote:
Thanks for the hint ! :thumbsup But I can allready write in PHP. For some reasons, I need it absolutely in a htaccess file. |
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.
|
I've always gone to Ray, creator of Strongbox for help with htaccess stuff.
You can email him at: support AT bettercgi DOT com |
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## ##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 |
|
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. |
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. |
Quote:
But I really need this to be coded in the htaccess file. And not in apache itself. |
[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. |
All times are GMT -7. The time now is 10:21 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123