1

I have an application that generates xml files, and they might contain special characters. My problem is that Apache will not give me the xml file if the url with the special character is encoded.

Example: File ABCö.xml is accessible by http://host/path/ABCö.xml, but if accessed with encoded url http://host/path/ABC%F6.xml apache gives me an 404.

Is this a setting in httpd.conf or do I need som rewriting to make the xml files accessible by both urls?

1
  • Are you sure the special characters in the file name are using the same encoding as you are in your URL? Commented Mar 5, 2012 at 9:44

1 Answer 1

3

You may have an encoding issue.

Most (all?) modern browsers use UTF-8 when encoding special characters in URLs that the user inputs directly into the address bar.

So when you enter ABCö.xml say in Firefox, it will transform ö into its UTF-8 multi-byte representation, so the end result will be

ABC%C3%B6.xml 

and not the single-byte

ABC%F6.xml 

only one of them will work. Check which encoding is used in your file name.

Sign up to request clarification or add additional context in comments.

1 Comment

You are right. Seems the 3rd party application trying to access my xml files is using latin1 (ISO-8859-1) when encoding the urls

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.