Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Jameson Cook
Jameson Cook
496 Points

.htaccess file - File Format?

In the Famous 5-Minute Install video for Wordpress, there's a step where a blank text editor file is created titled ".htaccess"

When I go to save this file, my text editor is prompting me with options for the File Format.

I can save it as Plain Text, .html, .rtf, or .odt

Which should it be?

2 Answers

The file name is the extension. It's simply .htaccess If you save it as a *.txt then it will automatically append the *.txt to your savefile. Before you click save, just try erasing the *.txt and writing .htaccess

If it adds the .txt to the end of the file, just rename it in your file explorer or Finder.

Jameson Cook
Jameson Cook
496 Points

So once the file is created, I can simply Rename and delete the additional format tag (.rtf or .txt or whatever) leaving it .htaccess

Thanks!

Thomas Skjelstad
Thomas Skjelstad
11,541 Points

A .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration. They are placed inside the web tree, and are able to override a subset of the server's global configuration for the directory that they are in, and all sub-directories.

.htaccess is saved as is. No file format extension. if you have troubles locating it in the folder you saved it to you might have to use filezilla ftp client to locate it. Use sublime text 2 if you have problems creating the file.