Welcome Guest, Not a member yet? Register   Sign In
Can't get rid of routing to "public"
#3

(03-15-2023, 10:12 AM)Tbronson Wrote: New installation of CI 4.3.2. with Bonfire 2. Trying to make this change to the home page URL

mysite.com/public TO mysite.com

Changed the document root to the "public" folder. Removed "public" from baseURL in .env and app/Config/App.php, leaving trailing slash.

Now, mysite.com gives a "404 Can't find a route for 'get: public'" error, and the URL in the browser address bar changes to mysite.com/public.

I've cleared every cache I can think of. Tried it in multiple browsers, on my Windows laptop and Android phone. 

These URLs work fine:

mysite.com/index.php // home page
mysite.com/admin // goes to Bonfire
mysite.com/home // I created a route to the "Home::index" in Routes.php

Exactly the same baseURL changes remove "public" no problem in another account in the same environment.

Any ideas?

I am not sure I understand what you did. What is the application structure now, and which directory on the server is accessed and which file is run when you open a browser at mysite.com? This does not make sense: "Removed "public" from baseURL in .env and app/Config/App.php, leaving trailing slash" - there is no "public" by default on $baseURL property in app/Config/App.php...

Anyway, in case you have not solved the problems yet: I have recently done some changes to Bonfire app links, so you may want to update the app and run it again.
==

Donatas G.
Reply


Messages In This Thread
RE: Can't get rid of routing to "public" - by dgvirtual - 05-11-2023, 02:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB