How to load a xml file that is in a cgi-bin folder in a flash movie
I have a perl script inside the cgi-bin folder that requests a flash movie that is located outside the cgi-bin folder. This flash movie loads an xml file that is located inside the cgi-bin folder. The reason for this structure is that I need the perl script to be able to write to the xml file before it is loaded in the flash movie. Therefore, the xml file needs to be inside the cgi-bin (I do not want to change my .htaccess file). However, the flash movie is not able to load the xml file in a different directory from where the .swf movie is, even if I specify a different path in the as3 from where the .swf file is located.
It keeps looking for the xml file inside the directory where the .swf file is.
I also use the following html code to embed my flash movie and tell the perl script that the .swf file is located in a different directory, outside the cgi-bin folder
param name='base' value = 'http://www.domain.ca/'
This is maybe what is creating the issue, but I do not see how to resolve it. Any help would be appreciated.
EDIT: I resolved the problem by leaving the xml file in my cgi-bin folder and by editing my Apache server configuration by adding a default-handler to the .xml extension. However, I am not sure if this may cause security issues and if there are other better solutions.
I think cgi-bin folder is not accessible by http. what you can do is create another perl script which reads the xml file and render it to the flash request.