| Author |
Message |
thebishop Worker


Joined: Aug 30, 2005 Posts: 174 Location: CA
|
Posted:
Mon Aug 06, 2007 11:39 pm |
|
Does anyone know how i can redirect a client currently on my site to another URL ?. I been reading a bit to try and find out how and i know it must be fairly easy but can't get a handle on how to do it. |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7481 Location: Arizona
|
Posted:
Tue Aug 07, 2007 6:23 am |
|
What exactly do you mean by "client". Just making sure so the question can be answered properly. Are you talking an IP address, a User Agent, a script, ... ? |
|
|
|
 |
thebishop Worker


Joined: Aug 30, 2005 Posts: 174 Location: CA
|
Posted:
Tue Aug 07, 2007 6:31 am |
|
Good question, both an ip address and a user agent. |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7481 Location: Arizona
|
Posted:
Tue Aug 07, 2007 7:09 am |
|
Ok, two examples for you then and these are strictly for .htaccess (means you must be using Apache and be allowed to use .htaccess by your host):
IP Address:
I will have to research more. Thought I had done this before, but apparently I have not and I cannot find as yet the appropriate way to do this.
User Agent:
| Code: | RewriteCond %{HTTP_USER_AGENT} ^Zeus
RewriteRule ^.*$ http://127.0.0.1 [R,L] |
Just change the IP address to whatever you wish to forward them to. You can also forward them to a URL instead of the IP. |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7481 Location: Arizona
|
Posted:
Tue Aug 07, 2007 7:27 am |
|
Ok, here is a "Possible" for IP Address but not tested:
| Code: | RewriteCond %{REMOTE_ADDR} nnn.nnn.nnn.nnn
RewriteRule ^.*$ http://127.0.0.1 [R,L] |
Where nnn are the IP address nodes that you want to trap for and you can change the 127.0.0.1 to a URL if you like or any other IP address.
Again, this is untested as I have never tried to use %{REMOTE_ADDR} before, only DENY statements. |
|
|
|
 |
thebishop Worker


Joined: Aug 30, 2005 Posts: 174 Location: CA
|
Posted:
Tue Aug 07, 2007 7:56 am |
|
Thanks Montego, i'll give that a try.  |
|
|
|
 |
|
|
|
|