Codeiginter 500 internal server error


I uploaded codeigniter
my website has error 500 internal server error
I’m using free hosting

The .htacces code

RewriteEngine On
RewriteBase / public_html /

RewriteCond% {REQUEST_URI} ^ system. *
RewriteRule ^ (. *) $ /index.php/$1 [L]

RewriteCond% {REQUEST_URI} ^ application. *
RewriteRule ^ (. *) $ /index.php/$1 [L]

RewriteCond% {REQUEST_FILENAME}! -f
RewriteCond% {REQUEST_FILENAME}! -d
RewriteRule ^ (. *) $ Index.php? / $ 1 [L]

RewriteCond% {REQUEST_URI} ^ assets. *
RewriteRule ^ (. *) $ /index.php/$1 [L]
</ ifModule>

$ config [‘base_url’] = ‘’;

So far I try on xampp localhost server never encountered such problem and I change the configuration in php.ini and no problem and it works.

After I try the hosting it appears again error because this is because php.ini that has not been configured according to my web needs, or limited to post_max_size, upload_max_size etc. for free.
or I must first configure the settings or I have to premium first.

Please help me
thank you


Hi, I believe your issue is with the base_url. What you’ll want to do is change that line of code to the following and it should work.

$ config [‘base_url’] = ‘';

This allows the program access to your root directory, whereas before you were linking to a folder that doesn’t exist. The public_html folder exists only in your server root directory, not to the public.


I’ve changed, still have the error.
is there any other error
Please help


this is the contents of my file folder


this error


The issue is the public_html part that is still there. Try accessing the site without the public_html at the end.

You may also receive that issue because some sites are throwing 502 errors and we are working on this.


still the same error


I have changed, there is still an error, I think my mistake in php.ini.
Because while on localhost, xampp I use a configuration like this
for php.ini:
post_max_size = 1024M
upload_max_size = 1024M
max_execution_time = 3600
max_input_time = 3600
memory_limit = 1024M
extension = php.fileinfo.dll

I intend to take premium but how to solve the problem, and I think when on localhost / xampp never experience it


@ilhamsetiawan You can tweak these configuration in your localhost(xampp), but 000webhost doesn’t provide these maximum limits which you mentioned.
As 000webhost is for learners/developers to test their projects so it is limited.

Don’t worry, Upgrading to premium will fix your issue.


Let us know if you need any other help. :slight_smile:


is there a limit to upload files


my web can be accessed and then after a few hours
another error 502 bad gate