0 Replies Latest reply on Nov 18, 2008 11:24 PM by Chaos7703

    Flex , Multiple domains, crossdomain.xml, & confusion

    Chaos7703
      Hello everyone I have a problem that goes a bit outside the realm of simply Flex development, but I figure that it's best to ask people who know Flex in addition to "server-stuff" (which I'm not too familiar with). I'm trying to get something set up for a friend and have read so much unhelpful gibberish about crossdomain.xml, SEO, URL redirects, etc. that I'm tired of trying to find the answer and trying things that don't seem to accomplish what I'm trying to do, or wondering if doing it "that way" is going to ruin search engine optimization (I read in one article something about Google dropping duplicate content from its listings, but it was unclear about the specifics.)

      Here's the situation:
      My friend has a primary domain - www.pdomain.com
      I've made three versions of the site for him at pdomain.com -- a Flex 2 version (www.pdomain.com/FlexApp.php [which is the wrapper for FlexApp.swf ]), an HTML version (www.pdomain/html/*.php), and a mobile version (www.pdomain/mobi/*.php) Note: pdomain.com/index.php has links to all three versions. All three share the same content which is stored in databases.
      My friend has purchased nine other domains that are aliases for pdomain.com (e.g. www.aka1.com, www.aka2.com, ... , www.aka9.com [all pointing to pdomain.com/index.php]), two aliases for the mobile version (e.g. aka10.mobi, aka11.mobi [which point directly to pdomain.com/mobi/index.php])
      All the the domains are registered at (were purchased from) GoDaddy.com.
      The site is hosted by LunarPages.com. (Linux, Apache 1.3.41, PHP 5, MySQL 5)

      The dilemma:
      I want/need pdomain.com & aka1 - aka9.com to all provide the same content, but there are a multitude of ways to do that.
      I want the browser's base URL to stay the same as what the user types--as opposed to them typing www.aka5.com which then jumps them to the correct page but switches the URL to www.pdomain.com (and possibly making them think that their browser was hijacked or something). This is how I HAD it set up until earlier today when I looked into the SEO analysis and found out that the aliases were no good because the godaddy redirect was placing the content in a frame which won't get indexed by robots.

      So, instead of using the godaddy redirect, I changed the nameservers on all the alias domains to point to the lunarpages nameserver and parked those domains on lunarpages. Now I get the desired browser URL effect mentioned above, but on all but pdomain.com, the Flex app can't get the data from the server to provide the content. All the images start loading and all-of-a-sudden BAM five alerts pop up telling me that all the attempts to call the middleware scripts was disallowed by the security sandbox.

      E.g.
      "Detail:[FaultEvent fault=[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"] messageId="6D96CD48-C6EE-BC57-B5EB-B36B0EC4D2ED" type="fault" bubbles=false cancelable=true eventPhase=2]"

      So I think at first, OK, that's just because the aliases aren't in my crossdomain.xml file, I'll fix that real quick:
      (Sorry, not sure if the "Attache Code" did anything-- there's no placeholder or code in this and the preview button just gives me an erroneous error: "Preview Message ERROR: Category not found." ???)

      <?xml version="1.0"?>
      <!DOCTYPE cross-domain-policy SYSTEM " http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
      <cross-domain-policy>
      <site-control permitted-cross-domain-policies="all"/>
      <allow-access-from domain="pdomain.com" />
      <allow-access-from domain="aka1.com" />
      <allow-access-from domain="aka2.com" />
      <allow-access-from domain="aka3.com" />
      ...
      <allow-access-from domain="aka9.com" />
      <allow-access-from domain="www.pdomain.com" />
      <allow-access-from domain="www.aka1.com" />
      <allow-access-from domain="www.aka2.com" />
      <allow-access-from domain="www.aka3.com" />
      ...
      <allow-access-from domain="www.aka9.com" />
      <allow-access-from domain="*.cooliris.com" secure="false" />
      <allow-access-from domain="*.piclens.com" secure="false" />
      </cross-domain-policy>

      But, the Flex app doesn't seem to care about the crossdomain file (@ www.pdomain.com/crossdomain.xml). Then, in the process of trying to get the crossdomain file to allow the Flex app to load its data (via an alias domain name [it works through pdomain.com]) I thought: "OK, so if I get this working like this, is that going to wipe out the SEO for the HTML (since it's duplicated via 10 distinct URLs)???" SEO was half the reason for the HTML version (the other half being accessibility/non-Javascript/non-Flash users)

      The end result that I want is that, the pdomain & 9 aliases all go to pdomain.com/index.php, retain their respective names, and the Flex application will work under each alias (as aka#.com/FlexApp.php). The two mobile aliases (aka10.com & aka11.com) will point to the folder pdomain.com/mobi/index.php, & retain the user typed domain name + the filename (e.g. aka11.com/whatever.php where aka11.com/whatever.php is identical to pdomain.com/mobi/whatever.php -- just addressed differently), and preferrably the content of each alias is included separately (or collectively) in search engine results.

      I really like Flex, AS3, PHP, Javascript, etc., but the server/HTTP stuff (subdomains, addon domains, .htaccess, nameservers, etc.), just doesn't really interest me--especially when I read the volumes of stuff that I have & don't really get anywhere.

      I hope I haven't bored anyone to death and thanks a lot for any help you can give me.
      Thanks a million times!!!,
      Todd

      Ps. I HAVE tried to talk my friend out of the multiple domain names, but he insists (and has a point) that different people will be more inclined to use or remember some names more than the other names.