Apr
4
2009

How to use crossdomain.

[digg-me]Yesterday I run into a problem, I was developing some project that was connecting to the Data Base placed on my server through amfphp, when I tested it from my computer everythink worked fine but when I uploaded it to my server and tried to run it, the script didnt work at all. The problem was I needen the crossdomain.xml file on my server. Sometimes to work with amfphp or some other server side scripts you need the crossdomain file. It has to be placed in your root folder of your server (for most of you it will be public_html or www folder). Your crossdomain.xml file should look like this:

< !DOCTYPE cross-domain-policy
SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
< cross-domain-policy>
< !-- Your domain name -->
< allow-access-from domain="domainName.com" secure="false"/>
< allow-access-from domain="domainName.com" to-ports="80,443"/>
< allow-http-request-headers-from domain="domainName.com" headers="*" />
< !-- this part handles the acces from sub domains -->
< allow-access-from domain="*.domainName.com" secure="false" />
< allow-access-from domain="*.domainName.com" to-ports="80,443" />
< allow-http-request-headers-from domain="*.domainName.com" headers="*" />
< /cross-domain-policy>

So why do we need the crossdomain file?
Basically it’s allowing the externall domains to access the content of your server.

Related Posts

About the Author: Kuba Gaj

Hi, my name is Kuba and I am the founder of massiveProCreation. I am interested in almost everything that is connected to technology (specially Adobe Flash). If you have any questions or suggestions please feel free to contact me :)

Leave a comment

Become an Author

We are looking for Authors, if you have a Flash (or related) knowledge and you want to share it with the community on our blog please contact us.

Partners