I need a HTACCESS pro ! (I pay with paypal)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CHMOD
    Confirmed User
    • Jun 2003
    • 1697

    #1

    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]
    Sell our Silicone Dolls and make big money!

    Our website:
    https://www.sexdolls-shop.com/

    Signup:
    http://www.sexdollscash.com/sliiing/registration.php

    Contact:
    [email protected]
  • pythonx
    Confirmed User
    • Aug 2004
    • 430

    #2
    15 min job? You could have done it by the time you typed this post.

    Comment

    • V_RocKs
      Damn Right I Kiss Ass!
      • Nov 2003
      • 32449

      #3
      Would make much more sense then to redirect them through your login page which I assume will be in PHP or ASP.

      Comment

      • V_RocKs
        Damn Right I Kiss Ass!
        • Nov 2003
        • 32449

        #4
        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!

        Comment

        • borked
          Totally Borked
          • Feb 2005
          • 6284

          #5
          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

          Comment

          • CHMOD
            Confirmed User
            • Jun 2003
            • 1697

            #6
            Originally posted by borked
            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'] );
                  }
              }
            }

            Thanks for the hint !

            But I can allready write in PHP.
            For some reasons, I need it absolutely in a htaccess file.
            Sell our Silicone Dolls and make big money!

            Our website:
            https://www.sexdolls-shop.com/

            Signup:
            http://www.sexdollscash.com/sliiing/registration.php

            Contact:
            [email protected]

            Comment

            • Varius
              Confirmed User
              • Jun 2004
              • 6890

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

              Comment

              • TisMe
                Confirmed User
                • Aug 2008
                • 1719

                #8
                I've always gone to Ray, creator of Strongbox for help with htaccess stuff.

                You can email him at: support AT bettercgi DOT com

                Comment

                • borked
                  Totally Borked
                  • Feb 2005
                  • 6284

                  #9
                  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>
                  if you add the
                  ##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

                  Comment

                  • borked
                    Totally Borked
                    • Feb 2005
                    • 6284

                    #10
                    see http://www.htaccesselite.com/setenvi...les-vt141.html

                    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

                    Comment

                    • darksoul
                      Confirmed User
                      • Apr 2002
                      • 4997

                      #11
                      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.
                      1337 5y54|)m1n: 157717888
                      BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
                      Cambooth

                      Comment

                      • CHMOD
                        Confirmed User
                        • Jun 2003
                        • 1697

                        #12
                        Originally posted by borked
                        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>
                        if you add the
                        ##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

                        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.
                        Sell our Silicone Dolls and make big money!

                        Our website:
                        https://www.sexdolls-shop.com/

                        Signup:
                        http://www.sexdollscash.com/sliiing/registration.php

                        Contact:
                        [email protected]

                        Comment

                        • CHMOD
                          Confirmed User
                          • Jun 2003
                          • 1697

                          #13
                          Originally posted by darksoul
                          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.
                          Yes I have found this solution too...

                          But I really need this to be coded in the htaccess file.
                          And not in apache itself.
                          Sell our Silicone Dolls and make big money!

                          Our website:
                          https://www.sexdolls-shop.com/

                          Signup:
                          http://www.sexdollscash.com/sliiing/registration.php

                          Contact:
                          [email protected]

                          Comment

                          • raymor
                            Confirmed User
                            • Oct 2002
                            • 3745

                            #14
                            [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&#64;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

                            Comment

                            Working...