Forum Moderators: phranque

Message Too Old, No Replies

Ban all ip addresses except mine

         

hOtTiGeR

2:23 pm on Dec 5, 2006 (gmt 0)

10+ Year Member



Hi there, my question is how can I rewrite everything to a certain URL provided the user has an IP that isn't mine?

I know I'll need a RewriteRule for the first part and a RewriteCond for the second, but I'm not sure how to go about it.

Thanks for any help

jdMorgan

3:06 pm on Dec 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See the RewriteCond directive in the mod_rewrite documentation, used along with the %{REMOTE_ADDR} variable and the pattern-match negation "!" operator.

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim