Navigation article:
The .htaccess file contains directives (instructions) that tell the server how you can behave in a few scenarios and have an effect on the way your website functions.
Redirects and rewriting URLs are a couple of common directives present in b .htaccess file, and lots of scripts for example WordPress, Drupal, Joomla and Magento add directives towards the .htaccess so individuals scripts could work.
It’s possible that you may want to edit the .htaccess file sooner or later, for a number of reasons.This covers how you can edit the file in cPanel, although not what might need to be altered.(You may want to consult other articles and sources for your information.)
There are lots of Methods to Edit b .htaccess File
- Edit the file on your pc and upload it towards the server via FTP
- Make use of an FTP program’s Edit Mode
- Use SSH along with a text editor
- Make use of the File Manager in cPanel
The simplest way to edit b .htaccess file for most of us is thru the File Manager in cPanel.
How you can Edit .htaccess files in cPanel’s File Manager
Before you decide to do anything whatsoever, it’s recommended that you simply backup your site to be able to revert to an earlier version if something wrong happens.
Open the File Manager
- Sign in to cPanel.
- Within the Files section, click the File Manager icon.
- Look into the box for Document Root for and choose the website name you want to gain access to in the drop-lower menu.
- Make certain Show Hidden Files (dotfiles)” is checked.
- Click Go. The File Manager will open inside a new tab or window.
- Search for the .htaccess file within the listing of files. You may want to scroll to locate it.
To Edit the .htaccess File
- Right click the .htaccess file and click on Code Edit in the menu. Alternatively, you are able to click the icon for that .htaccess file after which click the Code Editor icon towards the top of the page.
- A dialogue box may seem asking about encoding. Simply click Edit to carry on. The editor will open inside a new window.
- Edit the file when needed.
- Click Save Changes within the upper right hands corner when done. The alterations is going to be saved.
- Test out your web site to make certain your changes were effectively saved. Otherwise, correct the mistake or revert to the prior version until your website works again.
- Once complete, you are able to click Close to shut the File Manager window.
Resourse: https://webstrategiesinc.com/blog/