psorensen
psorensen

Reputation: 827

htaccess - prettify a minified version

I have an .htaccess with a good number of redirects. After being modified by a Wordpress plugin, it appears that all the rules have been concatenated; at least no line breaks are visible.

Edit:

This seems to be a problem only when the file is opened in Windows Notepad. When I open it with Sublime, or even copy a snippet to here, it shows the line breaks. I toggled line-wrap in Notepad, but it still treats the whole thing as a single line.

Upvotes: 0

Views: 62

Answers (1)

Diamondo25
Diamondo25

Reputation: 769

This seems to be a problem only when the file is opened in Windows Notepad.

This is because the file has non-Windows line endings (\r\n), but probably Linux line endings (\n). Windows Notepad only recognizes Windows line endings. You can use Notepad++ to convert line endings, but this does not stop Wordpress to apply the linux line endings, obviously.

Upvotes: 1

Related Questions