Welcome Guest, Not a member yet? Register   Sign In
Add a .js file and routes
#8

(This post was last modified: 08-12-2023, 02:25 AM by kenjis.)

(08-11-2023, 07:30 AM)arna Wrote: I've found that everything is redirected to the "public" folder, I guess it's the default configuration in the main htaccess.

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ public/$1 [L]

There is no .htaccess in the project root folder by default.
So if you have it, someone added it.

And it is the last resort and not recommend.
See https://codeigniter4.github.io/CodeIgnit...g-htaccess
So if you can configure to point the document root to the public folder,
you should do so.
Reply


Messages In This Thread
Add a .js file and routes - by arna - 08-10-2023, 06:58 PM
RE: Add a .js file and routes - by kenjis - 08-10-2023, 07:18 PM
RE: Add a .js file and routes - by ozornick - 08-10-2023, 10:36 PM
RE: Add a .js file and routes - by InsiteFX - 08-10-2023, 10:41 PM
RE: Add a .js file and routes - by arna - 08-11-2023, 07:30 AM
RE: Add a .js file and routes - by kenjis - 08-11-2023, 06:23 PM
RE: Add a .js file and routes - by sheilaf - 08-11-2023, 10:19 AM
RE: Add a .js file and routes - by arna - 08-11-2023, 11:02 AM
RE: Add a .js file and routes - by arna - 08-11-2023, 07:03 PM
RE: Add a .js file and routes - by ozornick - 08-11-2023, 08:40 PM
RE: Add a .js file and routes - by arna - 08-11-2023, 09:20 PM
RE: Add a .js file and routes - by InsiteFX - 08-11-2023, 10:39 PM
RE: Add a .js file and routes - by ozornick - 08-12-2023, 12:50 AM
RE: Add a .js file and routes - by kenjis - 08-12-2023, 02:45 AM
RE: Add a .js file and routes - by arna - 08-12-2023, 04:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB