I have created a simple application in YII2 and it is working fine at my local machine but giving me Not Found (#404) "Page Not Found" error when I uploaded it on server.
Local URL: localhost:8080/basicapp/web/index.php?r=adminPanel%2Fstatemaster%2Findex
Live URL: XXXX.com/web/index.php?r=adminPanel%2Fstatemaster%2Findex
I am not using any preetyurl and didn’t made any change in web.php (just added monules only).
Please help! Thanks in advance.
Anyone Please help me.
Hello Pankaj, I ran into the same problem when converting my application.
This happens because in Yii2 your request can’t have different cases, in your case ‘adminPanel’ gets converted to ‘admin-panel’, so it doesn’t find that.
You will have to change your link, so it points to admin-panel and you will have to change your adminPanel view folder to be admin-panel.
This happens because Yii2 adopts a more seo-friendly approach.
If anyone have similar problem, Just change your naming of models and controllers.
In my problem, model and controller names were like StateMasterController etc but it should be StatemasterController, mind the M.
It works for me, may be this can help you.
Thanks