It is surprisingly easy to create or edit a .htaccess file using DirectAdmin. The file contains configuration directives for other on-server files and directories.
To Create/Edit .htaccess File
1. Log in to your DirectAdmin account.
2. Go to the System Info & Files section and click on File Manager.
The File Manager interface will open in a new tab.
Originally, a .htaccess is a hidden file by default and therefore unviewable to users. It is why we recommend you check if the file exists before creating one.
3. Enter the following text in the address bar to check if the .htaccess file is present or not.
domain.com:2222/CMD_FILE_MANAGER/domains/domain.com/public_html/.htaccess?action=edit
If it shows an error message, the file is absent. It means you can create the .htaccess file.
4. Navigate to the public_html folder and click the + NEW menu.
5. A dropdown menu will appear where you have to select the Text File option and then Plain Text.
A popup window will appear where you can name and create a file.
6. Enter .htaccess in the text field and click CREATE.
The new .htaccess file will appear in the list of directories.
7. Right-click on the .htaccess file and select Edit.
8. Enter the directives and click SAVE.
Yes, it is that simple to create and edit a .htaccess file via DirectAdmin.