Search code examples
.htaccesscodeigniterhttp-redirect

CodeIgniter4 - Module works fine on localhost but not on production


On my code igniter application, I created an internal module (admin). After configure my .htaccess everything works fine:

RewriteCond %{REQUEST_URI} admin
RewriteRule ^(.*)$ index.php?/$1 [L]

But when I send the files to public folder, the route mysite.com/admin not is recognized I did tons of different configs on htaccess but all return 404 (and here on localmachine works fine). Probably is a problem of apache directives, but I cannot access it (only by .htaccess), any suggestion ?


Solution

  • Try this

    RewriteRule ^(.*)$ /index.php?/$1 [L]