he needs new hosting then
i would swap the site to wordpress
then block it
wats the site, i will have a look for you
Hello
I have a friend who has a small website and is constantly bombarded by 1 specific ip address, he asked "is there a way of forwarding this specific ip address to another site?"
I have seen there is bits n pieces out there for php and .htaccess redirect, but is there some html that can go on the index.html to direct someone with an ip address of 123.456.0.123 off to automatically when they come on to his site?
He was saying that his hosting site he uses doesn't allow access to the .htaccess file
thanks
f
有段者
Look Here -> |
he needs new hosting then
i would swap the site to wordpress
then block it
wats the site, i will have a look for you
https://www.facebook.com/philquad68
What would you do if your server was stolen or failed beyond repair?
http://www.2000cn.com.au/shadowprotect.html
freakee1 (08-11-12)
Javascript
<script language="javascript">
window.location.href = "http://example.com"
</script>
Meta tag
<meta http-equiv="refresh" content="0;url=http://example.com">
This JavaScript code snippet provided of course is bullshit. It redirects all visitors to "http://example.com".
--------------------------
@freakee1
First of all you must know that JavaScript itself has no access to get the IP address and neither does anything running on the server.
But if the web server where your site is hosted has SSI enabled (most Linux servers do), then there is a real chance to block not only an URL, but also an IP.
Code:<script type="text/javascript"> <!-- Hide script from old browsers<br> // if you know the referring URL, ex. "http://www.referringPageName.html" if(document.referrer = "http://www.referringPageName.html") { alert("Your URL has been banned from this site. Redirecting..."); window.location.replace("http://www.google.com"); } // if you know the referring IP address, ex. "23.23.23.23" else { // define list of banned ips, each separated with a comma: var bannedips=["23.23.23.23", "11.11.11.11"] // this part gets the IP var ip = '<!--#echo var="REMOTE_ADDR"-->'; var handleips=bannedips.join("|"); handleips=new RegExp(handleips, "i"); if (ip.search(handleips)!=-1) { alert("Your IP has been banned from this site. Redirecting..."); window.location.replace("http://www.google.com"); } } //-- Stop hiding script --> </script>
better late than never hey joey
https://www.facebook.com/philquad68
If you are going to use php ..then use this
PHP Code:
<?php
$competitor = $_SERVER['REMOTE_ADDR'];
if (preg_match("/HISIPADRESS/",$competitor))//any IP you want to fool//
{
include ('fakepage.php');
} else {
include ('realpage.php');
}
?>
Put the above just after the opening body tag of the real page..
Leave all the rest of the real page headers including titles, metas, etc just they are..
make fakepage.php correspond to the body content for him..
make realpage.php correspond to the body content for every one else..
leave the body area blank apart from the scripts ..so
also keep in mind This work..as long as he doesn't use proxies or his IP doesn't change.PHP Code:
<doctype>
<html>
<head>Real page header</head>
<body>
<?php
$competitor = $_SERVER['REMOTE_ADDR'];
if (preg_match("/HISIPADRESS/",$competitor))//any IP you want to fool//
{
include ('fakepage.php');
} else {
include ('realpage.php');
}
?>
</body>
</html>
Chieflets
Last edited by Chieflets; 26-12-13 at 03:24 PM.
tristen (25-01-14)
Your have to use 301 redirect go to the Google webmaster or open it's hosting plan and redirect it to your websites. Before one month my uncle site have same problems it was in Joomla and find out information and put into their roots and get solution. if you face any problems you can contact me via this forums.
Banned
Bookmarks