The .htaccess file is the local Apache settings document that instructs the Apache web server how to work with your website. Many useful and interesting things are possible with the settings inside .htaccess, but first you must know how to create and edit an .htaccess file. This article shows you how.
See the Related Articles section to see some of the things you can do with .htaccess once you have learned to create and edit the file.
In the pop-up dialog box, make sure Show system files and directories is checked. If it is not checked, check the box and then click
If there is still no .htaccess file visible, click the Create File from the drop-down list.
In the pop-up dialog box, enter .htaccess for the file name and click . You should now be able to see the .htaccess file in File Manager.
Click the name of the file to open it in the editor.
The Plesk editor does not have an undo feature. If you are not confident in your editing skills, follow these instructions to make a backup:
Make any desired additions or changes to the file in the editing area.
If you are using the Paper Lantern theme, in the FILES section of the cPanel home page, click File Manager:
Click on the public_html folder in the left panel of the File Manager. Files in public_html are shown in the right panel.
If the .htaccess file is not visible, click the Settings button at the upper right of the File Manager.
In the pop-up dialog box, make sure Show Hidden Files (dotfiles) is checked. If it is not checked, check the box and then click Save.
In the pop-up dialog box, enter .htaccess for the file name and click the Create New File button. You should now be able to see the .htaccess file in File Manager.
Right-click on the .htaccess file in the right-hand pane of File Manager and select
Make any desired additions or changes to the file in the editing area.
Click
nano httpdocs/.htaccess
For cPanel
nano public_html/.htaccess
For unmanaged servers
nano /var/www/html/.htaccess
Once the file is open, make any desired additions or changes to the file in the editing area.
Press Ctrl + O to write out the file. Make sure the File Name to Write is .htaccess. Press Enter.
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.
We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.