Codeigniter backend with vuejs frontend

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