I beed doing some research into this today. First of all, the following code in htaccess
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.+)\.(html|json|xml|atom|rss|rdf|txt)$ $1/ [L]
All it does, is rewrite to the same path, but without the extension (which is still stored in the request headers). For example:
https://www.photo.gallery/demo/x3/galleries/food.xml will rewrite to:
https://www.photo.gallery/demo/x3/galleries/food/
Then there is a rule further down the htaccess, which rewrites this to the application:
https://www.photo.gallery/demo/x3/galleries/food/ will rewrite to:
https://www.photo.gallery/demo/x3/index.php?/galleries/food/
From here, the Imagevue application takes over. In the example above, the extension is set to XML, which will be ignored by X3 because it has no correlating template assigned. However, in the case of JSON, there is a template assigned so it will output differently. This even works on on your server, so this is not related to the X3 application:
http://x3.aaa-awards.com/index.php?/galleries/food.json
(in the json output above, it does output "404" in the json, but this is just an example to show that the call itself does render properly in the PHP)
The problem with your server, is that the rewrite we have been working on, does not work (although you got the example working). If it was working, you would be able to check the following link, and it would just render like the normal page:
http://x3.aaa-awards.com/galleries/food.xml
https://www.photo.gallery/demo/x3/galleries/food.xml (as in our demo gallery)
As pointed out earlier, the rewrite just cuts off the extension, and adds a trailing slash (its that simple). On your server, it doesnt ... or you have wrong order in your rules, or you have colliding rules somehow.
Fix
I am quite interested in this issue, because I understand from after launching the beta that the more we can make ourselves independent from htaccess rules, especially mod_rewrite, the better. As explained above, the rewrite is basically just to make URL's look "nice", while this is also important for SEO. However, for ajax json calls, it does not really matter if the link is
website.com/nice/name.json or
website.com/?/ugly/name.json. As explained above, the following link:
https://www.photo.gallery/demo/x3/galleries/food.json simply rewrites to:
https://www.photo.gallery/demo/x3/index.php/ ... /food.json which is independent from htaccess rules.
Please get the following updated file
stacey.inc.php and replace it on your server
/app/stacey.inc.php. It should work like the example above, and allow us to load the json/ajax without accessing it through an URL that has to be re-written. It will not fix your website, because I would need to fix a few more things, but if the /?/page.json call works on your server, I will perhaps change it ...
The above does not change the fact that there must still be some issue in your htaccess file or your server. I can clearly see that the example redirect you made is working, but the original rewrite from /folder/name.json was not rewriting to /folder/name/, or it would output something else at least ...
I wouldn't mind accessing your server if you can offer FTP, but please update the file above first anyway!