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

Recommended Providers

Jetpack
Fully Managed WordPress Hosting
lc_banner_leadgen_3
Fully Managed WordPress Hosting

WordPress Theme

Divi WordPress Theme
WPZOOM

Forum Membership

Forum Membership

Redirect traffic from particular IP using .htaccess rewrite rule

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



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