Ervin
Ervin

Reputation: 2442

Flash not working without www

I have a flash movie which loads some images dynamically, through hphp gateway files. It works fine accessing through http://www.biaginiproperties.com/biagini-web but not through http://biaginiproperties.com/biagini-web . So it does not work without www.

I am passing from HTML to Flash through params flashvars the path of the server, with www.

What could be the problem?

Upvotes: 1

Views: 290

Answers (2)

Aesphere
Aesphere

Reputation: 604

You can try putting the following into crossdomain.xml file in your htdocs root

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policySYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
    <allow-access-from domain="www.biaginiproperties.com" />
    <allow-access-from domain="biaginiproperties.com" />
</cross-domain-policy>

hmm, strange, this part didn't show up....

I recall that flash player has a security policy that prevents it from accessing data outside of it's exact domain that it resides in, you can read up on it here

Upvotes: 1

jerebear
jerebear

Reputation: 6655

Technically, www and non-www are both separate domains when it comes to security.

Two options:

  1. Detect whether you're in www or not with PHP and adjust the flashvars accordingly

  2. Not positive this will work, but you can change the access restrictions when you publish your swf from "Local Files Only" to "Network Files Only." This may resolve the issue.

Upvotes: 2

Related Questions