Use .htaccess to ban a user

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shining Arcanine
    Senior Member
    • Feb 2003
    • 2482
    • 3.0.3

    Use .htaccess to ban a user

    I remember reading a post I think Freddie made a while back about a way to ban a user sitewide via .htaccess by the value of the bbuserid cookie. There is a spammer from ezboard on my forums who I would like to give this kind of ban to. Does anyone know how this would be done?
  • ShiningArcanine
    Senior Member
    • Feb 2003
    • 2482
    • 3.0.3

    #2
    Well, I was way off. A member posted it:



    I made some modifications:

    RewriteEngine on
    RewriteCond %{HTTP_COOKIE} ^.*bbuserid=497.*$
    RewriteRule $ - [F]
    That will give the guy a forbidden message. ^_^

    Comment

    • Ogmuk
      Senior Member
      • Jun 2003
      • 179

      #3
      I love to give them a tour around Disney.com, sometimes makes them angry about me 'screwing up their PC', heh. But as long as the page they're send to doesn't got a "Log Out" buttons, it's OK. It's keeping out some of those people you're just begging to get rid off.

      Comment

      • Ogmuk
        Senior Member
        • Jun 2003
        • 179

        #4
        Ok, I started to wonder how you can do the opposite. Forbid the access to everyone except someone with a specific bbuserid? I was thinking of !^.*bbuserid=497 but that doesn't work.

        Comment

        • Ogmuk
          Senior Member
          • Jun 2003
          • 179

          #5
          bump

          Comment

          • Ogmuk
            Senior Member
            • Jun 2003
            • 179

            #6
            RewriteEngine on
            RewriteCond %{HTTP_COOKIE} !^.*bbuserid=497.*$ [NC]
            RewriteCond %{HTTP_COOKIE} !^.*bbuserid=496.*$
            RewriteRule $ - [F]


            That did it.

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...