Tutorial-how to block an IP from visiting your Wordpress website+Hide / Show Hidden Files on Mac or Windows

Written by Cameron. Filed under Tutorials. Tagged FTP, Mac OS X, Mac OSX, Microsoft Windows, Operating system, Show Hidden Files, Text editor, Tutorials, Windows, Wordpress. Bookmark the Permalink. Post a Comment. Leave a Trackback URL.

Tutorial on how to block an IP from visiting your Wordpress website for beginners using either MAC OSX or PC. This tutorial actually shows you how to do it on any website, CMS like WP, Drupal, Joomla, XOOPS, Radiant, Simple CMS or other. It’s all the same really. Also tutorial on Show/Hide Hidden files for Mac OSX, Windows 95, 98, XP, 2003, NT, Vista.

1) Go to your FTP program or server file viewing interface and log in to your server.

2) Go to the folder where your Wordpress website is located (mine is /html/seowithfries.com, yours will likely be similar)

3) Find the file named .htaccess. If you can’t see it, enable the “show hidden files” option on your FTP Client.

4) Choose only one of the following options here, and stick to either option A or B in the following steps. Basically any file on your computer that begins with “.” (period/dot) will be hidden (.htaccess will not be visible when moved desktop).

option a) Drag it to your desktop (or download it to a folder of your choice) and remember where you got it from on your server.

option b) Rename the .htaccess file something like temp.htaccess and drag it to your desktop (or download it to a folder of your choice) and remember where you got it from on your server.

5)

option a – if you chose option a above ) Make sure your desktop (PC/Windows) or FINDER (Mac / OSX) is set to SHOW HIDDEN FILES. If you are unsure how to do that please see the attached tutorials below for your operating system. Open the .htaccess file to for editing.

option b – if you chose option b above ) Open the renamed temp.htaccess file in a text editor for editing.

6) At the bottom of your .htaccess file add the following (replacing 201.192.28.1 with the IP number you wish to block).

order allow,deny
deny from 201.192.28.1
allow from all

If you want to block multiple ip address using the .htaccess file simply add one ip address per line as below (replacing 201.192.29.01, 201.192.29.11, and 174.192.25.44 with the IP addresses you wish to block).

order allow,deny
deny from 201.192.29.01
deny from 201.192.29.11
deny from 174.192.25.44
allow from all

To block a range of IP addresses (on the same network) using .htaccess (something you should only do if you are sure the entire network is corrupt or risk loosing valuable readers) (replacing: 201.0.0 with the network range you want):

order allow,deny
deny from 201.0.0
allow from all

7)

option a) save the file as htaccess.txt (without the dot in front)

option b) save the file as temp.htaccess.txt

8) Move / Upload the edited file back to your server using your FTP of server backend interface (remeber the location, mine was /html/seowithfries.com)

9) Right click on the edited file you just uploaded and rename it .htaccess

10) You are done superstar.

Show or Hide Hidden Files on Mac OSX

1) Locate your Terminal application (located in your Applications/Utilities directory) and double click to launch it or type terminal in spotlight to locate it.

2) Enter the following Command into your Terminal application window:

defaults write com.apple.finder AppleShowAllFiles TRUE

3) You have to Log out of your Mac OS X session and log in again or restart your computer to see the changes.

4) To reverse the effect (hide the hidden files in the finder, enter the following terminal window command:

defaults write com.apple.finder AppleShowAllFiles FALSE

Show or Hide Hidden Files on PC / Windows

Windows 95

Enable viewing of Hidden files:

  • Close all programs so that you are at your desktop.
  • Double-click on the My Computer icon.
  • Select the View menu and then click Options.
  • After the new window appears select the View tab.
  • Scroll down until you see the Show all files radio button and select it.
  • Press the OK button and close the My Computer window.
  • Now your computer is configured to show all hidden files.

Windows 98

Enable viewing of Hidden files:

  • Close all programs so that you are at your desktop.
  • Double-click on the My Computer icon.
  • Select the View menu and then click Folder Options.
  • After the new window appears select the View tab.
  • Scroll down until you see the Show all files radio button and select it.
  • Press the Apply button and then the OK button and close the My Computer window.
  • Now your computer is configured to show all hidden files.

Windows ME

Enable viewing of Hidden files:

  • Close all programs so that you are at your desktop.
  • Double-click on the My Computer icon.
  • Select the Tools menu and click Folder Options.
  • After the new window appears select the View tab.
  • Under the Hidden files and folders section select the radio button labeled Show hidden files and folders.
  • Remove the checkmark from the checkbox labeled Hide file extensions for known file types.
  • Remove the checkmark from the checkbox labeled Hide protected operating system files.
  • Press the Apply button and then the OK button and shutdown My Computer.
  • Now your computer is configured to show all hidden files.

Windows NT

Enable viewing of Hidden files:

  • Close all programs so that you are at your desktop.
  • Double-click on the My Computer icon.
  • Select the View menu and then click Options.
  • After the new window appears select the View tab.
  • Scroll down until you see the Show all files radio button and select it.
  • Press the OK button and shutdown My Computer.
  • Now your computer is configured to show all hidden files.

And now a word from my guest

If your need Wordpress, SEO or WP plugin help in Toronto you can always hire me, and if you like getting SEO tips and Wordpress tips you can follow me on Twitter.

F3 | Cameron Kuc | SEO with Fries | Serving Wordpress, SEO, Viral Video, Handy Tips and Custom Hacks with a smile.

SEO with fries = Search Engine Optimization Services | Wordpress Expert Services | Viral Marketing and Digital Content Distribution | Social Media Management | Web 2.0 Strategy | Social Media Marketing | Film & Video Production | Video Post Production | Blogging + Blog Creation | New Media Services & Communications in Toronto & GTA

Reblog this post with Zemanta
pixelstats trackingpixel
SEO with Fries loves sharing
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Add to favorites
  • BlinkList
  • Blogosphere News
  • Diigo
  • email link Tutorial how to block an IP from visiting your Wordpress website+Hide / Show Hidden Files on Mac or Windows
  • Fark
  • Faves
  • Fleck
  • FriendFeed
  • HackerNews
  • LinkedIn
  • Meneame
  • MisterWong
  • MyShare
  • MySpace
  • Netvibes
  • Netvouz
  • NewsVine
  • Ping.fm
  • Posterous
  • Propeller
  • Reddit
  • Simpy
  • SphereIt
  • StumbleUpon
  • Technorati
  • Tipd
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yahoo! Buzz
  • eKudos
  • Wikio
  • blogmarks Tutorial how to block an IP from visiting your Wordpress website+Hide / Show Hidden Files on Mac or Windows
  • connotea Tutorial how to block an IP from visiting your Wordpress website+Hide / Show Hidden Files on Mac or Windows
  • Current
  • DotNetKicks
  • Live
  • MSN Reporter
  • N4G
  • Scoopeo
  • Socialogs
  • Suggest to Techmeme via Twitter

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Switch to our mobile site