Strange .htaccess behaviour


I have used .htaccess in different domains without problems until now. I open new domain with just one html file and one php file and it works fine until i uploaded a .htaccess!

Just to mention, this file works fine in my local web server (xampp)

Cutting down content of .htaccess dont help. I always recive Internal Server Error and in error.log there is an entry:

[Fri Feb 22 11:52:58 2008] [alert] [client]
/home/crollmm/ Invalid command
’\xef\xbb\xbfRewriteEngine’, perhaps mis-spelled or defined by a module not
included in the server configuration, referer:

content of .htaccess is only:
RewriteEngine On
RewriteBase /

What is wong? I’m affraid to test other domains which works properly. To be sure I tested some subdomains and same other domains and same thing happened.

If someone would like to help I would like to give FTP access to one of acounts.

Sorry for my English!


Login to your server and cat the .htaccess file. You will see strange characters.

What is happening is that your text editor is adding some hidden characters to your file so when apache tries to execute it it complains about them.

Try using notepad, vim or if you are on mac set textedit’s to use a unix encoding (not sure if that’s the correct option but you get the idea)



This strange characters i saw when view in HEX mod. I use Textpad over 5 years and i haven’t problems until now.

Thak you again,