How to Edit .htaccess Files on Mac OS X

.htaccess (or hypertext access files) are directory-level configuration files that apply special rules to the directory they're contained in. If you're managing a website from a Mac, you may need to follow a few extra steps to edit them since they may not be visible.


  1. 1
    Open your FTP client and log in to your server. FileZilla is an example of a widely used and free FTP client.
  2. 2
    Go to the root folder of your directory and look the for the .htaccess file. It is a hidden file, so you might need to set your FTP client to show hidden files. This is typically in the "View" menu.
  3. 3
    Copy this file to your desktop or any other folder where you store your website files.
    • The file will immediately disappear. Don't worry, it's still there, it's just invisible.
  4. 4
    Open Terminal and enter the following command:
    • defaults write AppleShowAllFiles YES
  5. 5
    Relaunch your finder app, by right clicking the icon in the dock menu and clicking restart/relaunch.
    • All hidden files, such as your .htaccess file, should now be visible.
    • To reverse this, go to terminal app and type in the same command, but with "NO" instead of "YES".

Article Info

Categories: Mac OS X | Website and Blog Creation