Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6
Author Message
thebishop
Worker
Worker



Joined: Aug 30, 2005
Posts: 244
Location: Flying to close to the sun

PostPosted: Mon Aug 06, 2007 11:39 pm Reply with quote

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.
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Tue Aug 07, 2007 6:23 am Reply with quote

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, ... ?

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
thebishop







PostPosted: Tue Aug 07, 2007 6:31 am Reply with quote

Good question, both an ip address and a user agent.
 
montego







PostPosted: Tue Aug 07, 2007 7:09 am Reply with quote

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







PostPosted: Tue Aug 07, 2007 7:27 am Reply with quote

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







PostPosted: Tue Aug 07, 2007 7:56 am Reply with quote

Thanks Montego, i'll give that a try. Smile
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©