Am working with Yii2 advanced template.
Based on https://github.com/yiisoft/yii2/blob/master/docs/guide/tutorial-shared-hosting.md and http://stackoverflow.com/questions/28118691/yii2-htaccess-how-to-hide-frontend-web-and-backend-web-completely
I have moved the contents of frontend/web to the root and backend/web to a new folder admin.
Now I can access http://localhost/yii-2.0.2-advanced/ and http://localhost/yii-2.0.2-advanced/admin
However, while I can log in ok, having performed the sign up proceedure, when I try to logout I get this error message from http://localhost/yii-2.0.2-advanced/site/logout
Bad Request (#400) Unable to verify your data submission.
If I click logout again from the nav, this time I get logged out and get redirected to http://localhost/yii-2.0.2-advanced// which is also odd
I’m not sure if I should be implementing this to the backend/config/main.php file - but when I tried that initially that also caused a bad request error… (this taken from the yii2 page referred to above)
'components' => [ 'request' => [ 'csrfParam' => '_backendCSRF', 'csrfCookie' => [ 'httpOnly' => true, 'path' => '/admin', ], ], 'user' => [ 'identityCookie' => [ 'name' => '_backendIdentity', 'path' => '/admin', 'httpOnly' => true, ], ], 'session' => [ 'name' => 'BACKENDSESSID', 'cookieParams' => [ 'path' => '/admin', ], ], ],
Any help much appreciated!
Addition: I’ve used the advanced improved template code instead - sorts these issues out