☑ Can I put the index.html in a different directory with other files?


I want to put the index.html(php) to different directory(and domain) with other files(‘files folder’ and ‘~js’ and ‘json’…).
But It doesn’t work…

Are there any way to change the settings about it?
Is this specification of PlayCanvas?

I tried a sample below:

(deleted sample page)

I modified the files below:
(I added the PATH to each directories. "pc/“or"js/”)

> <link rel="stylesheet" type="text/css" href="pc/styles.css">
> <link rel="manifest" href="pc/manifest.json">
> :
> :
> <script src="js/playcanvas-stable.min.js"></script>
> <script>
> :
>     SCENE_PATH = "pc/453663.json";
> :
>     CONFIG_FILENAME = "pc/config.json";
> :
> <body>
> <script src="pc/__start__.js"></script>
> <script src="pc/__loading__.js"></script>
> :


js folder

pc folder
|-files folder


I have taught by dave and solved it.

I modified index.html like below:

<link rel="stylesheet" type="text/css" href="http://example.com/pc/styles.css">
<link rel="manifest" href="http://example.com/pc/manifest.json">
<script src="http://example.com/js/playcanvas-stable.min.js"></script>
    ASSET_PREFIX = "http://example.com/pc/";
    SCRIPT_PREFIX = "http://example.com/pc/";
    CONFIG_FILENAME = "http://example.com/pc/config.json";
<script src="http://example.com/pc/__start__.js"></script>
<script src="http://example.com/pc/__loading__.js"></script>
1 Like