PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
thebishop
Worker
Worker


Joined: Aug 30, 2005
Posts: 174
Location: CA

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

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 AIM Address Yahoo Messenger MSN Messenger
montego
Site Admin


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

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

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, ... ?
View user's profile Send private message Visit poster's website
thebishop
Worker
Worker


Joined: Aug 30, 2005
Posts: 174
Location: CA

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

Good question, both an ip address and a user agent.
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
montego
Site Admin


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

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

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


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

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

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.
View user's profile Send private message Visit poster's website
thebishop
Worker
Worker


Joined: Aug 30, 2005
Posts: 174
Location: CA

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

Thanks Montego, i'll give that a try. Smile
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum