<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to Allow &amp; Deny by IP Address</title>
	<atom:link href="http://www.web-hosting-newsletter.com/2008/02/25/how-to-allow-and-deny-by-ip-address/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.web-hosting-newsletter.com/2008/02/25/how-to-allow-and-deny-by-ip-address/</link>
	<description></description>
	<lastBuildDate>Fri, 03 Sep 2010 04:12:21 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: JackFlash</title>
		<link>http://www.web-hosting-newsletter.com/2008/02/25/how-to-allow-and-deny-by-ip-address/comment-page-1/#comment-1279</link>
		<dc:creator>JackFlash</dc:creator>
		<pubDate>Fri, 29 Feb 2008 07:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-hosting-newsletter.com/2008/02/25/how-to-allow-and-deny-by-ip-address/#comment-1279</guid>
		<description>how can you block anyone when we obtain different ip address from the isp each time we log on to the internet?</description>
		<content:encoded><![CDATA[<p>how can you block anyone when we obtain different ip address from the isp each time we log on to the internet?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Skippy</title>
		<link>http://www.web-hosting-newsletter.com/2008/02/25/how-to-allow-and-deny-by-ip-address/comment-page-1/#comment-1225</link>
		<dc:creator>Skippy</dc:creator>
		<pubDate>Tue, 26 Feb 2008 22:05:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-hosting-newsletter.com/2008/02/25/how-to-allow-and-deny-by-ip-address/#comment-1225</guid>
		<description>It&#039;s not really possible to block a country because your .htaccess only receives IP&#039;s. Well, if you know all the IP classes for a certain country I guess it might work. :)

Here&#039;s another similar trick, using mod_rewrite. You can use it to redirect IP&#039;s to a certain page on your site or even another site.

&lt;code&gt;RewriteCond %{REQUEST_URI} !=/goaway.txt
RewriteCond %{REMOTE_ADDR} =aaa.aaa.aaa.aaa
RewriteRule .* /goaway.txt [R,L]&lt;/code&gt;

You can do classes as well, using regular expressions:

&lt;code&gt;RewriteCond %{REQUEST_URI} !=/goaway.txt
RewriteCond %{REMOTE_ADDR} ^aaa.aaa.aaa.
RewriteRule .* /goaway.txt [R,L]&lt;/code&gt;

I use this whenever I upgrade a website and I don&#039;t want anybody but me roaming the site for half an hour. Use something like whatismyip.org to find your current IP:

RewriteCond %{REQUEST_URI} !=/maintenance.txt
RewriteCond %{REMOTE_ADDR} !=your.current.ip.here
RewriteRule .* /maintenance.txt [R,L]

Just make sure to clear these lines when you&#039;re done. :)</description>
		<content:encoded><![CDATA[<p>It&#8217;s not really possible to block a country because your .htaccess only receives IP&#8217;s. Well, if you know all the IP classes for a certain country I guess it might work. <img src='http://www.web-hosting-newsletter.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here&#8217;s another similar trick, using mod_rewrite. You can use it to redirect IP&#8217;s to a certain page on your site or even another site.</p>
<p><code>RewriteCond %{REQUEST_URI} !=/goaway.txt<br />
RewriteCond %{REMOTE_ADDR} =aaa.aaa.aaa.aaa<br />
RewriteRule .* /goaway.txt [R,L]</code></p>
<p>You can do classes as well, using regular expressions:</p>
<p><code>RewriteCond %{REQUEST_URI} !=/goaway.txt<br />
RewriteCond %{REMOTE_ADDR} ^aaa.aaa.aaa.<br />
RewriteRule .* /goaway.txt [R,L]</code></p>
<p>I use this whenever I upgrade a website and I don&#8217;t want anybody but me roaming the site for half an hour. Use something like whatismyip.org to find your current IP:</p>
<p>RewriteCond %{REQUEST_URI} !=/maintenance.txt<br />
RewriteCond %{REMOTE_ADDR} !=your.current.ip.here<br />
RewriteRule .* /maintenance.txt [R,L]</p>
<p>Just make sure to clear these lines when you&#8217;re done. <img src='http://www.web-hosting-newsletter.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mihai</title>
		<link>http://www.web-hosting-newsletter.com/2008/02/25/how-to-allow-and-deny-by-ip-address/comment-page-1/#comment-1224</link>
		<dc:creator>Mihai</dc:creator>
		<pubDate>Tue, 26 Feb 2008 21:00:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-hosting-newsletter.com/2008/02/25/how-to-allow-and-deny-by-ip-address/#comment-1224</guid>
		<description>is it possible to deny a country ? something like any webpage at  *.be ? or it needs to be for the hole ip class of the provider ? someone told me a long time ago that this is possible ...

Thank you</description>
		<content:encoded><![CDATA[<p>is it possible to deny a country ? something like any webpage at  *.be ? or it needs to be for the hole ip class of the provider ? someone told me a long time ago that this is possible &#8230;</p>
<p>Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: February&#8230; &#124; web-hosting-newsletter.com</title>
		<link>http://www.web-hosting-newsletter.com/2008/02/25/how-to-allow-and-deny-by-ip-address/comment-page-1/#comment-1195</link>
		<dc:creator>February&#8230; &#124; web-hosting-newsletter.com</dc:creator>
		<pubDate>Tue, 26 Feb 2008 14:23:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-hosting-newsletter.com/2008/02/25/how-to-allow-and-deny-by-ip-address/#comment-1195</guid>
		<description>[...] How to Allow &amp; Deny by IP Address [...]</description>
		<content:encoded><![CDATA[<p>[...] How to Allow &amp; Deny by IP Address [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benny</title>
		<link>http://www.web-hosting-newsletter.com/2008/02/25/how-to-allow-and-deny-by-ip-address/comment-page-1/#comment-1190</link>
		<dc:creator>Benny</dc:creator>
		<pubDate>Tue, 26 Feb 2008 14:13:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.web-hosting-newsletter.com/2008/02/25/how-to-allow-and-deny-by-ip-address/#comment-1190</guid>
		<description>Thanks for this.  Going to have to bookmark it and save it for a rainy day. :P</description>
		<content:encoded><![CDATA[<p>Thanks for this.  Going to have to bookmark it and save it for a rainy day. <img src='http://www.web-hosting-newsletter.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
