<<< Back to the TFU FAQ
FAQ 20: IDN-domains. How to configure TFU to work with domains with special characters that are not ansi (New 2.15).
If you are using a domain with special characters (IDN = Internationalized Domain Names) flash uploads (flash applications which loads/saves something from/to the server in general) don't work normally on all browsers because they handle the special chars different. I'll explain the problem/difference for e.g. Firefox and IE9:
Lets use www.müller.de as example. The IDN domain for this url is xn--mller-kva.de
- IE9 (and e.g. Safari) does internally treat e.g. www.müller.de as
xn--mller-kva.de and the flash plugin does the same. So there is no problem with the flash accessing a different domain.
- Firefox (and IE8 and a couple of other browsers) do url encode the domain in flash when special chars are used. So the firefox flash plugin tries to access www.müller.de with www.m%C3%BCller.de and this fails!
The only working solution for all browsers is to use an alias to the same domain and tell the flash to use this alternative domain. So if you want to use the uploader on a domain with non ascii chars you need:
- An alias domain on the same server
- An crossdomain.xml on the server
- TFU configured properly to use the alias domain.
Lets go into details now.
- You need an alias for your domain with only ascii chars. This alias has to point to the same location as the IDN domain does and share the same session. So it is not possilbe to use a different server!
- You can create an alias by registering a new domain and link it to the same folder as your IDN domain. e.g if you have www.müller.de you can register www.mueller.de as alias
- OR: If you already have a different domain on the server without special chars you also use a different way if in your administration it is possible to do the following: Create a subdomain on the other domain and set the location to the root folder of your IDN domain. Some administrations automatically create a subdirectory that you cannot change. If this is the case this way is not possible. e.g. You already have www.myupload.de with a different content. Create a subdomain called upload.myupload.de and set the root of this domain to the IDN domain. e.g. at strato this can be done. then you don't have to register a new domain.
Without an alias you don't need to continue!
- You need a crossdomain.xml to allow the flash to access a different domain than the one he comes from. During setup you can use a crossdomain.xml that allows everything. Create a file called crossdomain.xml put the following text in the file and save it in utf-8 in the root of your domain:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
After setup please replace * with your real domain. I my example this would be
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="www.müller.de" />
<allow-access-from domain="xn--mller-kva.de" />
</cross-domain-policy>
Please provide both ways to support all browsers.
- Finally you have to configure TFU to use the alternative url.
- TFU
- Set enable_absolut_path=true at the flash. Set flashvars.enable_absolut_path = "true"; for the Javascript part or set enable_absolut_path=true directly at the flash.
- You have to implement the Javascript function getIDN() that has to return the alias + the full path to the TFU folder. This is not done by a flash parameter because this can be faked.
For my example this would be:
<script type="text/javascript">
function getIDN() {
return "http://www.mueller.de/tfu";
}
</script>
if tfu is installed in the folder tfu.
- JFU - Enter the full path to the Joomla root without a / at the end. The setting is on the main config page of JFU. If Joomla is installed in the root then in my example it would be http://www.mueller.de. If Joomla is installed in a sub dir it is e.g. http://www.mueller.de/joomla
- WFU - Enter the full path to the Wordpress root without a / at the end. The setting can be done at the end of the basic settings. If Wordpress is installed in the root then in my example it would be http://www.mueller.de. If Wordpress is installed in a sub dir it is e.g. http://www.mueller.de/joomla
Have fun using JFU.
|