Issue:
While editing several files within the /htdocs folder of my website, I noticed that my .htaccess file has disappeared. When attempting to create a new one through Monsta’s file manager, I receive the following error message:
“Error during FTP download, file not found: ‘/.htaccess’.”
I also tried creating a new .htaccess file using FileZilla FTP. Although the file is initially created, it is immediately deleted afterward. My file is only 4KB, so it doesn’t appear to be an issue of file size.
I’ve checked other forums, but most solutions pertain to file size, which doesn’t seem relevant in my case. Any assistance in resolving this would be greatly appreciated, as my website functionality is currently affected. TIA
I mentioned I had already tried that (IF’s file manager is a third party tool called Monsta). It was through that file manager that I received the original error message.
I have just tried. It’s run pretty well. And…other hand…in this case, why you don’t try flashfxp to upload file .htaccess from your computer? I’m using FlashFXP, I think FlaskFXP better than FileZilla.
I know typically .htaccess is kept in /htdocs or any other public folder. However, when I had created the site, it put the .htaccess file in the root folder instead of the public so assumed this is how IF formats their directories.
By default, a .htaccess file is created with some standard rules. But it’s not possible to update or recreate that file. You can delete it if you want. There is not a lot of benefit to deleting that file, but also basically no downsides to it.
If you would like to setup your own .htaccess rules, you can do so by creating a .htaccess file in the htdocs directory of your website.