What is the significance of HTACCESS?

Hi, recently I installed elgg on a domain. For the record, the folder structures were:

public_html/elgg

public_html/data

Strangely though, the setup DID NOT create the ".HTACCESS" file. However, everything seems to work well.

So my question is, if all works fine, WHY do we need the .htaccess file in the first place?

Any thoughts are extremely valued!

  • If your install works, the .htaccess file must be there.

    Keep in mind that files starting with "." are often hidden by default in ftp clients and for shell commands like ls.

    On a Unix system,

    ls -a

    will reveal all.

  • .htaccess is often essential for making things behave properly. One thing it does, for example, is set the system to output 'pretty permalinks' so that the URLs of generated pages appear readable, and are also liked by SEO rules in search engine spiders such as Google's.

    As Kevin says, files with a dot at the start of the name are often hidden. If you use a Windows FTP application as I do, there's usually an option to make them visible.

    Windows doesn't treat .htaccess files well, as they appear to be an extension with no filename. I use the free Jarte editor rather than Notepad, and this allows me to open .htaccess as its default editor.