Web Appbuilder deploying index.php

2960
2
Jump to solution
08-31-2015 06:52 AM
JohnChurchill
New Contributor III

Hi,

    I have created my web application with the Web AppBuilder Developer edition, downloaded the zip file and customized the index.html file. Everything works fine until I change the name to index.php. I am doing this because I have some custom php code that I want to include in the file. I can name it index2.html but <anything>.php seems to not work. Can I do this? and if so, how?

0 Kudos
1 Solution

Accepted Solutions
JunshanLiu
Occasional Contributor III

This is caused by getPath function in env.js. In this function there is path check

/\.html$/.test

Could you change the html to php in this line to have a try?

View solution in original post

2 Replies
JunshanLiu
Occasional Contributor III

This is caused by getPath function in env.js. In this function there is path check

/\.html$/.test

Could you change the html to php in this line to have a try?

JohnChurchill
New Contributor III

That works very well and if I add an "OR" in there (line 162) with the double-pipe I could also continue to use html pages. Thanks very much for your attention to this!

} else if (/\.php$/.test(fullPath.split('/').pop()) || /\.html$/.test(fullPath.split('/').pop())) {

0 Kudos