0

im new to the entire CodeIgniter bubble, as well as hosting, routing, networking etc.. so please bear with me.

Im developing a Website (Frontend VueJs, Backend Ci4 RESTFul (no views)) and I will be deploying it on an IONOS (1&1) Dedicated Server (managed).

When I connect to the server via FileZilla, the root is structerd like:

"ExampleWebsite" <- www.example.de/ "BETA_ExampleWebsite" <. www.beta.example.de/ "logs"

Currently I have the vue app inside the "BETA_ExampleWebsite" folder which is working fine.

In this folder there is another subfolder called "REST", inside this folder the entire ci4 installation is located.

Now, if I navigate to "www.example.de/REST/public" the "$routes->get('/', 'Controller::Method')" is accessed as expected.

But if I try to navigate to any other route like "$routes->get('/blog','Blog::index')" I get a 404 response.

This is also true for any axios.get requests made from VueJs.

The .env file has "app.baseURL = 'http://beta.example.de'"

Again, as I said, my knowledge about this entire topic is very limited to say the least, can anyone help me with that?

Also, I think that the ci4 installation should be outside of the "BETA_ExampleWebsite" folder so it cant be reached through the browser am I wrong?

BTW: when i connect to the server via SSH the mentioned above folders are at the following directory: "/kunden/homepages/41/d946984736068/htdocs/"

If you guys need any more information im happy to provide it. Thanks in advance!

De0x95
  • 11
  • 2
  • Don't know how to do it on your hosting, but you have to set the document root to the codeigniter's /public directory – Dusan Aug 17 '23 at 14:07

0 Answers0