Where does the .htaccess file go?

I have found several topics discussing how to handle the .htaccess file during deployment, etc but I just need to add an .htaccess file to a live site and I am not worried about how to handle the file in different envirionments.

Does anybody know where this file should be placed? Root of the site? web directory? Somewhere else? I can’t seem to find this information anywhere in the documentation.

Any help would be greatly appreciated.

In the web directory indeed

Posting here, because it’s related.

I’ve created .htaccess file in the web dir. But git is not recognizing any changes.
How do I deploy this to the remote server if I can push it to github?

Bedrock tells Git to ignore the file. Just remove this line if you want it in your repo.

oh I just had a duh moment, haha.
Thanks dude, you were pro in answering it so fast.
And no judgment at how dumb my question was.

1 Like