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

Recommended Providers



WordPress Hosting

Jetpack
Fully Managed WordPress Hosting
lc_banner_leadgen_3
Fully Managed WordPress Hosting

WordPress

WordPress Hosting Divi WordPress Theme
WPZOOM
Bluehost WordPress Hosting

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


WordPress Hosting