Fixing the htaccess "Long Lines" Problem Print

  • 38

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

  1. 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.
  2. Right-click the file and choose "Code Edit" from the context menu.
  3. Paste the proper code into the new file.
  4. 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.
  5. Save the file.
  6. Rename the broken .htaccess file ".htaccess-old", and refresh the page.
  7. 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.
  8. Test the website to check that it works.

 



Was this answer helpful?

« Back