Forum Moderators: phranque

Message Too Old, No Replies

How to redirect a certain IP range?

using .htaccess

         

ukwebsitefan

11:32 pm on Nov 7, 2004 (gmt 0)

10+ Year Member



Hello people

I would like to redirect a particular IP range to another website. So for example

I get visitors from the ip range 555.555.555.001 to 555.555.555.555

in short 555.555.555.*

I'd like to redirect these users to another website say www.google.com

any help will be appreciated

regards

jdMorgan

2:03 pm on Nov 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ukwebsitefan,

Welcome to WebmasterWorld!

Here are several previous threads [google.com] to get you started. See also the references cited in our forum charter [webmasterworld.com].

Jim

ukwebsitefan

3:10 pm on Nov 8, 2004 (gmt 0)

10+ Year Member



Hi,

thanks for the links but I could only find information on blocking ip ranges and NOT redirecting :(

EBear

4:13 pm on Nov 8, 2004 (gmt 0)

10+ Year Member



Hi ukwebsitefan,

I'm no expert on Apache, but a search in Google for "redirect IP address htaccess" (without the quotes) throws up many threads here.

One cheap way to do it is to ban the IP using deny and then set up a custom 403 page with a redirect to wherever you want them to go. This is described in
[webmasterworld.com...]

There's a more detailed thread here:
[webmasterworld.com...]
I haven't had a chance to read through it but it might have an answer.

Finally this short thread seems to be what you're looking for:
[webmasterworld.com...]

Best of luck.

ukwebsitefan

4:48 pm on Nov 8, 2004 (gmt 0)

10+ Year Member



Thanks alot ebear! Much appreciated :)

jdMorgan

4:50 pm on Nov 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See also the references cited in our forum charter.

...especially the many examples in the URL Rewriting Guide.

Jim