Fixing the htaccess "Long Lines" Problem

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.

 


  • 38 Users Found This Useful
Was this answer helpful?

Related Articles

Do you offer password protected directories?

By default, cPanel allows you to password protect directories in your account that you wish to...

Why can't I log into my cpanel or webmail?

There various issues that you may not be able to login to your cPanel or WebMail. We have...

Custom Error Pages

Creating your own error pages can be accomplished through cPanel. After logging in, under...

Requesting a New cPanel Password

Resetting Your cPanel PasswordYou can reset your cPanel password from the cPanel login screen....

Secure cPanel Login

Using Shared SSL to Access cPanel Use https, enter your site's IP address, and the secure port...