Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> .htaccess Charset Problem...
teob
post Feb 9 2005, 06:34 PM
Post #1


Newbie [Level 3]
***

Group: Members
Posts: 43
Joined: 15-November 04
Member No.: 2,292



I have a problem with the charset in my php page...

firstly
the whole site included .html and .php didn't automaticly get the right charset i put in the meta content

so I added a .htaccess file
CODE
AddDefaultCharset Big5


then it works fine with the .html file extension...
but not my php file...

so i added another line in .htaccess file
CODE
AddCharset Big5 .php


but still not working...
there is something i wondering...
coz my link to the php file is
"foo.php?A=B"
would that be the problem that the .htaccess file dun see it as a normal .php?

Plz help this is annoying me for the whole day...
Go to the top of the page
 
+Quote Post
bjrn
post Feb 9 2005, 09:17 PM
Post #2


Super Member
*********

Group: Members
Posts: 378
Joined: 8-January 05
Member No.: 3,174



Strange, it looks like you've done the right thing with AddCharset, but since it isn't working perhaps you can add:
AddType 'text/html; charset=Big5' php
to your .htaccess file instead?


Another solution would be to set the following at the beginning of your php documents:
CODE
<?php header("Content-Type: text/html; charset=Big5"); ?>

It's important that you do that before sending anything to the client (before any content).

And make sure that you don't have something like: "<meta http-equiv="Content-Type" content="text/html;charset=utf-8">" in the head of your html. THat might screw things up as well.
Go to the top of the page
 
+Quote Post
teob
post Feb 14 2005, 01:07 AM
Post #3


Newbie [Level 3]
***

Group: Members
Posts: 43
Joined: 15-November 04
Member No.: 2,292



i solved the problem...
i sent a mail to the support of my hosting...

actually the problem is not about the .htaccess dry.gif

QUOTE
We use the CGI version of PHP and some .htaccess changes won't affect PHP files due to the order of processing. So I have removed the .htaccess and moved the AddDefaultCharset Big5 line into the pre loaded Apache configuration for your site.


that what i get from them...
CGI version of PHP... never know about it..

anyway thanx bjrn
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. [^] Need Help With Regex (for .htaccess)(2)


 



- Lo-Fi Version Time is now: 6th September 2008 - 06:48 PM