Error when creating .htaccess and robots.txt in root directory

Whenever i am trying to create htaccess in the root directory it is showing an error, i have deleted every automatically generated files such as index2, htaccess and some bunch of other files, public files are kept in htdocs folder.

Error:

Error during FTP download, file not found: “/.htaccess”.


I tried to upload htaccess using filezilla but after uploading it still get vanished

Read this?

4 Likes

That’s because you can’t create a .htaccess file in the root directory. If you want to configure .htaccess rules for your website, simply create a .htaccess file in the htdocs directory of the website you want to set the rules for.

5 Likes