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

Redirect traffic from particular IP using .htaccess rewrite rule

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

WordPress Premium Themes


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 Premium Themes