Tag Info

New answers tagged

1

You can try something like this: <? $deny = array("111.111.111", "222.222.222", "333.333.333"); foreach ($deny as $denyip) { if (strpos($_SERVER['REMOTE_ADDR'], $denyip)===0) { header("location: http://www.google.com/"); exit(); } } ?> This basically loops through all denied IP's and checks if the user's IP starts with the IP written in ...


1

Sharing the back-end is the right idea. You don't want to constantly have to upgrade packages on multiple domains. Maybe you have your own engine to drive multiple sites. That gives you ultimate flexibility. On the face of it, there is no reason why sharing the back-end should affect your sites' rankings. However, rankings can be affected by perverse ...


0

If the dedicated IP when browsed shows a cPanel page, it means that you do not have a unique/dedicated IP address assigned. The IP is being shared with multiple sites. It should show just your website content. It is not recommended as it would have duplicate content on the website and the IP address when browsed. Search Engines might penalize you for it.


1

No, generally you wouldn't want the IP address to resolve to your website in addition to the domain itself (providing your domain resolves to the website, this will suffice) - there is often no need for the website to be accessible at the IP address but you could 301 redirect the IP address to your domain in .htaccess to handle this if you wish.


2

If you have ever tried to access gmail, facebook, ... with two different browsers in a same computer you see that you can and if you sign out of one the other one is still signed in meanwhile you have the same IP Address(network layer of TCP/IP) on both browsers(application layer of TCP/IP).


2

There is a way to directly block the viewing of the images using .htaccess RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost.*$ [NC] RewriteRule \.(gif|jpg)$ - [F] This is going to return a 403 Forbidden error if you access the image directly, but it does allow them to be ...


1

These are not Googlebot IP addresses. It is not uncommon for a bad bot operator to use Googlebot as an agent name to make you think they are okay. I found that a lot of bad bot operators come from Amazon IP addresses though I would not considering blocking Amazon IP addresses except one at a time. The Apache documentation can be found here: ...


0

The PHP code that John Conde posted does not work. It replaces the entire .htaccess file as an undesirable result. The PHP below would be a good replacement for his PHP and I have tested it. <?php $ipdeny = 'deny from ' . $_SERVER['REMOTE_ADDR']; file_put_contents('.htaccess', $ipdeny . PHP_EOL, FILE_APPEND); ?>



Top 50 recent answers are included