Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.