Hello, I have set up a standard cgi/php/static application that is based on a core set of PHP files. It is based on AJAX calls to these php files that provide dynamic content for each 'page'. The application is such that multiple versions of this 'website' are configured with a few different scripts contained in subfolders contained within this application, that also contain a new index.php page; i.e each new folder with configuration files = A new 'website' based on core files that comunicate with the configuration scripts. As a result of this behaviour, it is preferable to give each of the 'websites' a different domain. This can be achieved by creating a symbolic link app and directing it to the index.php file in the configuration folder. However, the server will not execute the php code in the core file folder when it is called cross domain! It will deliver any static pages of javascript files or resources like images, but the server will not process any php code. I have tried adding; But to no avail, Thanks in advance, Hugh asked 09 Feb '12, 06:12 hughcrail |
Could you try adding the following line in your .htaccess at the root of your application's directory and let us know it works? Header set Access-Control-Allow-Origin * answered 09 Feb '12, 08:57 iliasr ♦♦ That was actually already set in my .htaccess file, however with just this set, the page wont even deliver the static content included in the php file, That is why I had to add header("Access-Control-Allow-Origin: *"); to each of the scripts manually, this allows the server to serve the static content included in the php files but it does not execute any of the php code. I understand that what you did was a shortcut to my manual altering of each php file, I think my .htaccess file may be configured badly, any tips would be appreciated!
(09 Feb '12, 09:22)
hughcrail
If you think that your .htaccess is misconfigured then you'd better open a support ticket so we could take a look at it. You can open a ticket via our ticketing system or via the 'Support' menu item at our control panel.
(09 Feb '12, 10:45)
iliasr ♦♦
|