Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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: sha1sum /path/to/.htaccess.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.