Can’t upload .htaccess after editing in notepad

using notepad to enforce secure page. Format is UTF-8.

The problem is that Windows Notepad saves UTF-8 files with a Byte Order Mark (BOM) – which it uses to identify the file encoding (other systems, Apache included, do not require this). If you look at the saved file in a hex editor, you will see the 3 bytes EF BB BF (that displays as  in CP1252) at the start of the file.

It is likely that this BOM is breaking Apache. (I would perhaps expect you are seeing a 500 Internal Server Error response?)

If using Notepad, save as “ANSI” (for simple files like this), or use a different editor.