Skip navigation
Currently Being Moderated

crossdomain.xml for subdirectory level

Aug 10, 2012 3:24 AM

Tags: #swf #https #crossdomain.xml #crossdomain

Hi

We need to deploy crossdomain.xml on our webserver, but the host name remains same across different websites,

How can we add restrictions at sub-directoty level (website1)?

 

the URLs are like below, now how can I add restriction to have only for website1?

 

www.mysite.com/content/website1/test.html

www.mysite.com/content/website2/test.html

www.mysite.com/content/website3/test.html

 

 

e,g,

<?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.mysite.com" secure="false" />

<allow-access-from domain="mysite.com" secure="false" />

</cross-domain-policy

 

 

Thanks!

 
Replies
  • kglad
    72,340 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 10, 2012 7:22 AM   in reply to mp05

    at your root level use crossdomain.xml:

     

    <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">

    <!--- 

    this should be in the root and allows all policy files but gives access to no domains. 

    a policy file (eg, crossdomain2.xml) in a subdirectory with allow-access-from allows domain access to

    the directory, and dependent subdirectories, that contain crossdomain2.xml

    -->

    <cross-domain-policy>

    <site-control permitted-cross-domain-policies="all"/>

    </cross-domain-policy>

     

    and in a subdirectory that you want to allow access, use crossdomain2.xml:

     

    <?xml version="1.0"?>

    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">

    <!--- 

    this policy file (eg, crossdomain2.xml) in a directory will allow access to that directory and its subdirectories

    IF there's a root policy file allowing cross-domain-policies (eg, crossdomain.xml)

    -->

    <cross-domain-policy>

      <!--<allow-access-from domain="www.adobe.com" />-->

    <allow-access-from domain="www.adobe.com" />

    </cross-domain-policy>

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points