I created a simple .htaccess on windows using ultraedit, but after I uploaded to the linux apache server, it won't work, always gave me 500 error. I used linux command line to cat it, it shows that there's an empty space in front of the first line. But if I hand typed the exact same .htaccess in linux, using vi, then it's no problem. but if I put the same exact content in ultraedit, and save it, and it just won't work on linux. I'm not sure why is this so.
Check Apache's error log, it should give the exact error.
Most likely, something's wrong with the formatting of the file itself (pretty quotes? not sure if it chokes on this, but CRLF endings?), or the permissions on the file.
You can verify that the files are the exact same content (they are not; at least the line endings are going to be different currently) with checksums: