CodeIgniter 404 Page Not Found, but why?

前端 未结 11 2388
Happy的楠姐
Happy的楠姐 2020-12-11 14:48

I am using CodeIgniter for two applications (a public and an admin app). The important elements of the document structure are:

/admin
/admin/.htaccess
/admin         


        
11条回答
  •  盖世英雄少女心
    2020-12-11 15:30

    Leaving this answer here for others who ran into my situation.

    My codeigniter app was working fine in localhost/WAMP, but was unable to route and produced 404 not found errors when pushing to an AWS EC2 instance. My issue was solved from the answer from HERE htaccess works in localhost but doesn't work in EC2 instance

    (route to my admin page) {domain}/admin was producing 404

    the /etc/httpd/conf/httpd.conf file needs to be modified.

    -after every instance of "DocumentRoot "/var/www/html"" (2 places) "AllowOverride None" needed to be changed to "AllowOverride All".

    Restarted the EC2 instance from the AWS dashboard.

    {domain}/admin is now accessible and working as intended.

    hope this helps someone else like it helped me!

提交回复
热议问题