Tuesday, August 25, 2020

.htaccess file issue

.htaccess file issue

Typically this problem will generate an error message like the one below in the error_log file of the Apache server:

Invalid command '\xef\xbb\xbf#', perhaps misspelled or defined by a module not included in the server configuration

The reason is most probably that you are editing .htaccess file using Windows Notepad. Notepad is configured per default to save files with BOM. The Apache server does not expect this format and will generate an error. The file shall be pure UTF-8.

Solution: change the file editing software to Notepad ++ (open source file editing SW)...

...BUT this is not straightforward.