Hey everybody I want to let you know that I have undertaken the grueling task of getting the heck away from WordPress. I was so sick of the problems and updates I had to do all the time. I am now using my ezbloo system and I am integrating all my old posts into the new system. It sucks, but in the end, I will save bundles of time. I needed to keep things simple and that is why I created ezbloo. I'll have more on this later for you guys after I am done with the total integration of my old posts here. So if you are looking for a post and need it faster, shoot me an email and I will make it a priority. [email protected]

Redirect IP Address using htaccess

Redirect IP Address Using htaccess to get rid of annoying visitors that come to leave you spam. Better yet would you not like to tell them off with a web page especially for them? You can even redirect an entire country to a certain page or even another website altogether using htaccess. I decided to do this tutorial because there are a lot of people out there getting harassed by hackers and spammers. This can be your way of telling them off, lol. You can also use this as a tool to reward those people who come to your site a lot by directing them to a thank you page. If you are multi-lingual you can even have a page just for those foreign speaking visitors.  Use your imagination and the sky is the limit. The following method only works on Linux servers with Apache installed. Windows servers do not support htaccess. Step 1 Set your page up that you want certain people to be directed to.

http://getoffmysite.com
http://thanksforvisiting.com

Step #2

Figure out what Redirect IP Address you want to redirect. In wordpress you can do this by clicking on your comments section in your dashboard. All the ip addresses are listed right under the users name. If you have cpanel go to logs then recent visits if you know they person was just on your site, you will be able to see what pages they visited to give you an idea of who they are. Redirect IP Address Using htaccess wordpress Redirect IP Address Using htaccess Step #3

Look the person up in the whois database. This will give you a lot of valuable information about the person. Step #4 After you are sure about the ip address find your .htacces file in your root folder. You can access it via a ftp program like filezilla. You may have to go into your cpanel and set up a ftp log in if you don't have one. You can contact your hosting provider and they will walk you through the process. I will have a tutorial on this very soon. Now find your .htaccess file and download it to your computer. edirect IP Address Using htaccess filezilla Redirect IP Address Using htaccess filezilla2 Step #5

Now double-click and edit the .htaccess file by entering this code. you can use notepad or download notpad++ here.

# permanently redirect specific IP request for entire site
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_HOST} 22\.22\.22\.239
RewriteRule \.php$ http://www.destinationwebsite.com/ [R=301,L]
Or if you want to redirect a whole range of ip address use this code.
# permanently redirect ranged IP request for single page
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} 22\.22\.22
RewriteCond %{REQUEST_URI} page-with-form-on.php$
RewriteRule .* http://www.destinationwebsite.com/ [R=301,L]
Step #6

Upload the .htaccess file in the exact same folder where you got it from. warning!!! do not upload to another folder! Redirect IP Address is so much fun! Now your all done, it's just too bad you cannot see the look on the hackers face when they been hacked. ;-) If you want to say updated on more WordPress tutorials and more subscribe to my feed and we will email them to you as we post them.