I am building a rest API using slim framework . everything works perfectly on my local machine .
Any one tell me the steps to how to deploy a slim rest API on shared hosting/cPanel/go-daddy
Where i put my URL
file name
index.php
.htaccess
dbconnect
2
Answers
Basically, you have to rename your
public
folder topublic_html
.“…when you upload your files, your
.htaccess
andindex.php
files that were previously in your public folder will now go into thepublic_html
folder.” (tflight answer)Answer based on: How to deploy slim on a shared host
If doesn’t work please give us more details, how is your folder structure? what the logs file said? what do you mean with “where i put my URL?”
Slim Framework 4
For Slim version 4 the following line must be added in the index file inside the public folder, located in the root of the application.
folder public/index.php
add line:
$app->setBasePath(‘/foldeHosting’);