• Welcome to Web Hosting Forum - A Web Hosting Community for Webmasters.
 

Recommended Providers

WordPress

Forum Membership

Forum Membership

Redirect traffic from particular IP using .htaccess rewrite rule

Started by Kailash, September 17, 2009, 11:10:47 AM


Hosting Offer


Kailash

If you have want to redirect your site traffic from particular IP address, you can do it using .htaccess. You will just need to add the following code in your .htaccess file:

RewriteCond %{REMOTE_ADDR} ^123\.123\.123\.123$ [OR]
RewriteCond %{REMOTE_ADDR} ^12\.12\.12\.12$
RewriteRule .* http://www.webhostingdiscussion.net [R,L]

You will need to change the IP address accordingly.

Kailash

WordPress Hosting