Codeigniter backend with vuejs frontend

dir user does not exist on the server


it is inside the controllers folder on codeigniter

this button when clicked

does an XHR post to this location (but that address does not exist because there is no dir user either)

— 2 —
you are not calling user.php
but only user (without extension as far as I can see from my picture )

This system is only designed to work with GET and POST methods, because most websites only use those HTTP methods. Other methods, like PUT, DELETE and PATCH are not supported.


Ok Thank you. I think my website won’t work here



Besides, I see that your user.php starts with the uppercase letter User.php

and the files on the server are case-sensitive


I don’t think you need to worry about the folders or files not being present.

Most frameworks, which I assume includes CodeIgniter, don’t have separate files and folders for each URL. Instead, all URLs are captured by a single index.php, after which the framework code determines what page to show.

So why doesn’t your /user/login URL work? I see two issues:

  • The PHP file that’s supposed to be called by your site is in the public folder, not the main htdocs folder.
  • There is no .htaccess file to ensure that all unknown URLs are captured by the main index.php.

But you can forego this by trying to access the login page at this URL:

When I open that URL, I see a CodeIgniter error message. That means it’s hitting your framework code, which is progress.

As for why it’s crashing, I leave that up to you to investigate.

As for the URLs, I would suggest the following:

  • Place the .htaccess snippet from this article into a .htaccess file directly in the htdocs folder.
  • Place the .htaccess snippet from this article in a .htaccess file in the public folder within the htdocs folder.

These two .htaccess snippets should ensure that the URL should get rerouted to


Thanks for the help. it is currently accessing the codeigniter. but now it wont load the build files that I have added to it. Any idea why?

I have tried another approach with just adding the htaccess to the public folder and adjusted the axios call to “” from my understanding this should work but I am currently receiving a error message like this.

Can you confirm that your DB host settings are not localhost

and that the DB name matches the actual name (which are listed in the client area and control panel)

because this is what I see



I have checked it and the settings for the database where not matching, after matching them. it is still producing the same issue. The 500(Internal Server Error)

1 Like

What usually causes this 500 (Internal Server Error)?


Any other solutions I can try?

Can you show your DB settings? Is there a display error message that you can turn on?


does it all work on your local host well?

if yes - then you should look for differences between local and here on the server

on local - PATH and addresses are mostly “localhost”
or sometimes even worse C:/user/docs/

while there on the server they are much more specific

“walk” through the addresses of your website (domain)
and see which ones work normally (e.g. domain only)

and when you go to some other addresses like “/user/login”
you get 500 (now I don’t see it anymore, so I don’t know exactly what you changed)

but in short it means you need to experiment and find out
“at which place” you get the error

and then when you know the “place” (address) where it happens
you look at the code yourself and what all the components are included there

and use the process of elimination until you find the cause

you can even comment some code
or create a dummy file that does not contain everything like the original
then call it (test)
then add more and more code inside and see when it “cracks”.

It is difficult for us to help you because we do not have insight into your files (php code is not displayed to us, also all files that start with .dot)

Additional problem is because you have more components

  • your app
  • then CI
  • .htaccess
  • DB

all of them can make e-500

it doesn’t have to be one cause, there can be 5 of them


Debug your code?

It’s your website, your account, your code, your framework of choice and your configuration. You’re by far the best person equipped here to diagnose this.

Remember: this is your code returning an error code. Only you can tell why that is.

If you find out that it’s caused by an error or odd behavior of the hosting, then we can definitely look into that. But if that’s the case, we need a LOT more information than “I get a 500 error” to be of any help.



I meant to hide your website URL
because it throws out the user password and other data during the error
but here in the topic are many posts + imgs mentioning that address

So it would be best if you either change the environment in CI
so it doesn’t print sensitive data

or to upload it all on another subdomain that you will create
and which no one knows about except you
and that you are experimenting there

Because in the current state,
if I add “public” to the appropriate place in the address, I can see sensitive data

if I can do it, then someone malicious can “make a mess”.

after I discovered “the changed address”
I see error 500 again
I have a feeling that your PDO is breaking on DSN
or some other information it needs for DB is not correct


Thank you for the help. I will look into my code.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.