David Bovill wrote:

> The server return 400 Not Found when routing for a *.json file, while
> 200 OK when routing for a *.txt file - all other conditions seem the
> same.
...
> The .htaccess in the $DOCUMENT_ROOT folder does not mention json file
> endings.

Ah, we may have been looking at this backwards.

Rather than ask why Apache ISN'T serving JSON, we might ask why it SHOULD.

IIRC, following the general principle of least access Apache's defaults serve only a small number of types, and additional types must be added explicitly.

Just as we use directives to tell Apache to recognize the file type ".lc", you should be able to tell it to recognize .json by adding this to Apache's config:

    AddType application/json .json


Details here also show how to force UTF-8 for json, along with other tips:

https://htaccessbook.com/useful-htaccess-rules/


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to