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.
Steps
- 1Open your FTP client and log in to your server. FileZilla is an example of a widely used and free FTP client.
- 2Go 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.
- 3Copy 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.
- 4Open Terminal and enter the following command:
defaults write com.apple.finder AppleShowAllFiles YES
- 5Relaunch 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