Editing HTACCESS in Mac OS X

Sometimes you need to be able to edit .htaccess and other hidden files in your local development environment. First you need to expose hidden files by launching Terminal and executing the following command:

defaults write com.apple.finder AppleShowAllFiles YES

Next you need to relaunch the Finder (command-option-esc).

Import .htaccess from your web server directory, make a backup and then rename the original file “htaccess.txt” so that you edit it in TextEdit or some other text editor.

After making your edits, do the following:

    1. Upload “htaccess.txt” to your web server directory
    2. Delete “.htaccess” from your web server directory
    3. Rename “htaccess.txt” to “.htaccess”