Welcome Guest, Not a member yet? Register   Sign In
Install CodeIgniter 4 on shared hosting

It's there, it's the .htaccess unmodified that comes with CI when installed with composer, that is:

Options All -Indexes

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On

        RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule ^(.*)/$ /$1 [L,R=301]

        RewriteCond %{HTTPS} !=on
       RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
       RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]

        RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA]

    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

<IfModule !mod_rewrite.c>
    ErrorDocument 404 index.php

My guess is that the solution would be a rule in .htaccess. In development I use XAMMP, I have set up a virtual host whose document root points to /public folder, just as in production the subdomain points to that folder too, in development the app runs ok, so I think the problem is in the server config. But I have not found which rule I could use in this case.

Messages In This Thread
RE: Install CodeIgniter 4 on shared hosting - by jordivid - 01-14-2021, 02:55 AM

Theme © iAndrew 2016 - Forum software by © MyBB