Problem in Uploading Codeigniter project to webhost


#1

I have this file structure like this… inside the folder junior high my code igniter project is located.

I do not know the configuration to set on the following:

.htaccess on the root folder public_html
config.php
index.php
.htaccess on the application folder

etc to make it to go live. so please help


#2

Did you do these?
https://codeigniter.com/user_guide/installation/index.html


#3

yes i did it just displays the data / but not the theme of the grocery crud…


#4

Hi @blendedbinah !

inside the folder junior high my code igniter project is located.

Shouldn’t you have the content of this folder located at your website root? (/public_html)


#5

i place the content of all the project at the website root (/public_html) still the same.


#6

Do you get any errors, blank page, something?


#7

i got no error the only problem is that the theme for the Grocery CRUD theme does not work… they way it should be


#8

Please go to 000webhost cPanel > Settings > General > Change PHP version > 5.6 and try again.


#9

I got here the screen shot…

thats my problem… hmmm how i wish you are also familiar with the grocery crud for CI


#10

In this case, please go to .htaccess, in /public_html and append the following code to a new line:

Header always set Content-Security-Policy: upgrade-insecure-requests

Fully refresh your webpage (CTRL+F5) to see the applied changes.


#11

i still got same problem…

here are my folder structure

am i right that this are the texts inside the .htaccess?

i have placed the .htacess inside the root folder public_html

my folder structure are

public_html
–.htaccess
–CI project
–application
–asset
–controllers


#12


Your website attempts to load the resources from an address that doesn’t exist. 000webhost no longer allows www in front of subdomains.

If you can, please correct the website address from config and set it up only as sephinah.000webhostapp.com.


#13

I successfully changed it thanks nginx… and it worked…

my next problem is that all the buttons don’t work the usual thing.


#14

They are redirecting to a wrong address.

This can be configured as well, however I don’t know how.

I have an idea. Remove sephinah.000webhostapp.com from where you have configured it from your previous issue, and replace it with /


#15

NGINX THANK YOU SO MUCH I HAVE RESOLVED NOW I CAN START THE MY SCHOOL PROJECT :slight_smile: Thank you very much I would like to know if the .htaccess you told me should be like that one?

or i can modify it?


#16

Thank you very much I would like to know if the .htaccess you told me should be like that one?

Not exactly. I have provided you that code to bypass certain security issues caused by the browser.

You can leave it the way it is now, but if you need certain settings you can modify it, sure :wink:


#17

i see… so therefore, it is not necessarily needed anymore. I deleted it and nothing changed. so far. I will try to add more security perhaps on the setting thanks!!


#18

You’re welcome! :blush:


#19