Home > Enterprise >  CodeIgniter 4 Route url not found "The requested URL was not found on this server." deploy
CodeIgniter 4 Route url not found "The requested URL was not found on this server." deploy

Time:04-02

Greetings I have a problem with my application in CodeIgniter 4, recently I moved all my websites to Heroku and for this website what is built in CodeIgniter 4 https://myconfessio.com/ only the index/home page look right but when I try to go to another page or do something else I get the error

Not Found The requested URL was not found on this server.

Why is this happening and how can I fix this?

CodePudding user response:

I found some solution when I create .htaccess in a public folder and put this

RewriteEngine on

RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
  • Related