Fixing the htaccess "Long Lines" Problem
When editing the .htaccess file with a text editor (both cPanel editors and other text editors) long lines can sometimes get wrapped around, causing a line break.Â
Fixing Line Breaks with cPanel's Text Editor
- Create a new file in the folder that the damaged .htaccess file resides in - this is normally the document root folder. Name the file fix.txt.
- Right-click the file and choose "Code Edit" from the context menu.
- Paste the proper code into the new file.
- In the lowest row of icons above the text field of the editor, next to the blue question mark, is the word-wrapping mode toggle. Click it.
- Save the file.
- Rename the broken .htaccess file ".htaccess-old", and refresh the page.
- You will now see a new .htaccess file has been automatically created. Copy the code from fix.txt and paste it into the new .htaccess file, and save it.
- Test the website to check that it works.
Â