Forum Moderators: phranque

Message Too Old, No Replies

htaccess newb

IP redirect to another domain

         

whodunnit05

8:54 am on Mar 22, 2005 (gmt 0)

10+ Year Member



Here is what is going on.. a buddy of mine just lost his job because of our personal site. I currently have them blocked using .htaccess file, but what I want to do is take the company IP (thats the only IP I care about blocking) and redirecting it to www.someothersite.com.

Being as I am a newb to htaccess could you plz show the complete code. that has been the whole problem when reading the previous threads...
Thanks in advance

jdMorgan

12:40 am on Mar 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



whodunnit05,

Welcome to WebmasterWorld!

The general form would be to change the final RewriteRule from


RewriteRule <something> - [F]

-to-
 RewriteRule <something> http://www.example.com [R=301,L] 

where "example.com" is the site you want to redirect them to.

For more information, see the references cited in our forum charter [webmasterworld.com].

Jim

whodunnit05

1:02 am on Mar 23, 2005 (gmt 0)

10+ Year Member



Great Thanks for the help guys... Im sure I will be back soon.