#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    256
    Rep Power
    13

    .htaccess to block, not working


    I've got the following
    Code:
    Options +FollowSymLinks 
    RewriteEngine on 
    RewriteCond %{REMOTE_ADDR} ^xxx\.xx\.xx\.xxx [OR] 
    RewriteCond %{REMOTE_ADDR} ^xxx\.xx 
    RewriteRule  .* http://youtu.be/lTin-eTnkOM [R=301,L]
    in my .htaccess file. I have a lot more but for the sake of ease let's just say I've blocked both a partial IP as well as a specific full IP just in case.

    Said IP is still getting through.

    I've been trying desperately to find a good way blocking certain IPs and thought this was working...until now it seems to not be.

    (the youtube rewrite is 'Never Gonna Give You Up'... just for sh!ts and giggles).

    Anyone see where my code is wrong or why this one is getting through???
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,961
    Rep Power
    9397
    Using Order and Allow/Deny is better. That's actually what they're for. You can't redirect with them though, just present a 403.
    Code:
    Order deny,allow
    Deny from xxx.xx.xx.xxx
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    256
    Rep Power
    13
    Originally Posted by requinix
    Using Order and Allow/Deny is better. That's actually what they're for. You can't redirect with them though, just present a 403.
    Code:
    Order deny,allow
    Deny from xxx.xx.xx.xxx
    Thanks...I'm just so curious to know if they've managed some way of getting past the htaccess file....
  6. #4
  7. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,961
    Rep Power
    9397
    They didn't get past it. The stuff you have isn't targeting them correctly. Maybe the wrong IP address, maybe the stuff you've written isn't correct, maybe they aren't actually "getting through".

IMN logo majestic logo threadwatch logo seochat tools logo