0
votes

I'm getting a 500 Internal Server Error when I add an .htaccess file to the root of my site on MAMP. I have a virtual host set up, so the site is accessable through site.dev and my files live in /Users/Dan/Websites/site. There isn't any .htaccess files above the my current directory. At first, I thought it was something going on inside of my file, but I removed everything except for a commented line and the error is still there. When I have a blank file, the error goes away.

Update: Here's the error log

[Mon Apr 01 11:17:18 2013] [alert] [client 127.0.0.1] /Users/Dan/Websites/site/.htaccess: Invalid command '\xff\xfe#', perhaps misspelled or defined by a module not included in the server configuration

Any ideas?

1
Please check Apache logs for the exact error description. - Álvaro González
@ÁlvaroG.Vicario I posted the log message - Dan

1 Answers

2
votes

\xff\xfe is the byte-order marker (BOM) for UTF-16. There's nothing wrong with that but Apache doesn't seem to support BOMs at all. So you'll need to save your .htaccess file with a different encoding, either a single-byte one or UTF-8 without BOM.