How can I make an htaccess file on a Mac? [closed]

I’m trying to set-up pretty permalinks for my site. WordPress has a warning that my htaccess files is not writable. It provided some code to copy and put in the htaccess file.

I’m on a Mac, my local machine running WordPress 3.1.1.

I coped the code WP provided and pasted it into a new new TextEdit file that I named 1.htaccess . I put the file in the root directory Sites/mysite/. Then I tried to re-name the file and remove the “1”, but my Mac gave a warning that files starting with “.” are system files and wouldn’t let me re-name it.

How can I make an htaccess file on a Mac?

Thank you.

-Laxmidi

5 Answers
5

Open up terminal. Found in Utilities.

Type:

cd /path/to/htaccess/file/
mv 1.htaccess .htaccess

For future edits of the htaccess file I’d recommend learning to use vi in the terminal.

cd /path/to/htaccess/file/
vi .htaccess

Leave a Comment