htaccess redirect specific ip to a different site?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Juicy D. Links
    So Fucking Banned
    • Apr 2001
    • 122992

    #1

    htaccess redirect specific ip to a different site?

    order allow,deny
    deny from 24.111.111.111

    allow from all


    that blocks em now i want to send em to www.google.com

    Whats best way?


    thx
  • ProG
    Confirmed User
    • Apr 2009
    • 1319

    #2
    I think if you were to use the allow/deny method you would need to use ErrorDocument 403 to redirect. Otherwise you could use mod_rewrite:

    Code:
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REMOTE_ADDR} !^127.0.0.0$
    RewriteRule .* http://www.google.com/ [R=301,L]
    History will be kind to me for I intend to write it.

    Comment

    Working...