Moving PHP Files

Hi all, I started building an app with the my front-end PHP files in the root directory. I decided then to split some of these files off to /manager to create an admin area. I’m now getting a 404 error when trying to POST to server connect on the moved files as it is expecting /manager/functions/dmxConnect/api whereas at the moment my files are located at /functions/dmxConnect/api. Is there something I’ve missed when moving the files over?

Thanks

Hi John,

If you aren’t too deep into the process, or can roll back, i would suggest using the built in routing function of Wappler to create your public facing URLs because then you won’t have to physically move them. If that’s not an option you will have to find all references of the moved files and change to the new location.

@mebeingken - I am currently using wappler routing for all of my files, and I have updated all of the routes to match the new file locations. Everything is working as expected on the front-end, the issues only arises when I go to post a form or something that requires a server action, it is expecting Wappler’s files to be in my new location or /manager as opposed to root

If I’m understanding correctly, it sounds like you have to adjust the path of the form action. You might have a leading dot slash which points to the folder of your front end file.

Maybe some screenshots will help…like the code view of your form action.

Not sure what I’ve done but I’ve managed to fix the issue. I think I turned off ‘Use Routing’ under Project Settings and turned it back on. This looks like it has re-generated the routes to the wappler directories. Thanks for your help

1 Like

Makes sense…there is also a button to regenerate the routes you can use. Glad you got it working again!