Strange error with apache and htaccess

sky

Verified User
Joined
Nov 12, 2004
Messages
318
[fixed] Strange error with apache and htaccess

Hello

Im not sure if this is with last update of DA or not... but today when i add a new domain, then i add my normal htaccess file ... i get a apache internal error.

My htaccess is :
Code:
AddDefaultCharset UTF-8

RewriteEngine on
RewriteCond $1 !^(index\.php|cgi\-bin|robots\.txt|medias)
RewriteRule ^(.*)$ /index.php/$1 [L]

I get no error if i dont combine the charset settings and the rewriteengine.
Not errors, but the rewrite is not working...

I use this one on many website ... always worked untill now and i dont think i have changed something that can mess with apache ...

This problem only occured on new accounts.
All old accounts are working fine.

In apache logs this is what i get :
[Tue Dec 06 17:46:05 2011] [alert] [client 78.225.243.125] /home/europe/domains/domain.com/public_html/.htaccess: AddDefaultCharset takes one argument, The name of the default charset to add to any Content-Type without one or 'Off' to disable

Any ideas ?
Thank you for your help.

I can provide more information... :-)

Regards.
 
Last edited:
After doing some more checking : its the same on the second DA server we have.
 
Hello,

I doubt that would be related to the DA update...
If my reading of the message is correct, apache thinks that the AddDefaultCharset does not have 1 argument, but rather 0 or more than 1...
Check to make sure there are no extra spaces after the value.

I have not personally played with that option, but there might other solutions as well, if we can't figure out that one.
eg: http://www.askapache.com/htaccess/setting-charset-in-htaccess.html

John
 
Hello

rewrite engine is not working also.

I tried on my 2 DA servers... exact same problems with NEW accounts.

Im not sure its related to DA last Update, but strange coincidence. :-)

Ill try and checkout the httpd conf files for the new domains and compare to old domains.

Sky
 
Im very sorry.
Your correct.

For some reason, my computer is striping all line jumps in the files i upload to server.

Best regards, and sorry for the time.
 
Im very sorry.
Your correct.

For some reason, my computer is striping all line jumps in the files i upload to server.

Best regards, and sorry for the time.
Probably file needs to uploaded by ftp, with ascii paramater.

Jeff
 
Back
Top