Hi,
I developed web app with codeigniter 4 and hosting it on my VPS. During develoent I didnt care much about configuring CI but now when app is almost ready I decided to configure.everything right and I experiance one problem at the begining.
While developing app my document root was public_html, and I was accessing my app like example.com/public/index.php/controler
Also all assets are in CI public directory (/public/css. /Public/js ...etc)
What I did now is I changed on server document root to CI public folder (instead of public_html which was document root in development), and now I can access my app as planned: example.com/controler (so no public in link).
But my assets are behaving strange while included in head (css) and footer (js). It looks like it only include partial files and not complete because se styles are not applied and others are. I never experiance.this before. When try to visit those files dorectly from browser they load and open, also evertying loads according to Chrome inspect tool.
I experiance this only if I include files with links in this format:
/Css/myfile.css
But if I add public to.this path, like
/Public/Css/myfile.css
Everthing is workimg and displayed as it should.
To make things even more strange, I can open myfile.css in my browser with any of those two paths (with public in path and also without it). I dont dont under why and how.
I can force my app to work.by including public in path.of.include.links but I feel that.sething is not right and that should be fixed before public relise.