开发者

Auth redirects to SController

开发者 https://www.devze.com 2023-02-16 09:29 出处:网络
I have a few controllers, for example \'blogs\' and \'users\', if I go to \'blogs/add\' I get redirected to the auth login page, when I login I should get back to \'blogs/add\', but I get redirected t

I have a few controllers, for example 'blogs' and 'users', if I go to 'blogs/add' I get redirected to the auth login page, when I login I should get back to 'blogs/add', but I get redirected to 's/add' instead!

This doesn't happen when I try the same thing but with the u开发者_Go百科sers controller or with any other controller.

As far as I can see there are no strange functions in the blogs controller, I just baked it with 'cake bake controller blogs scaffold' and didn't change anything.


Have you defined any custom routes? ( in /app/config/routes.php )


I found the answer, my project was named "blog" and apparently you can't name your project the same as your controller ("blogs"). It's an bug in the Auth component wich doesn't redirect right, you can just rename your project to solve it.

0

精彩评论

暂无评论...
验证码 换一张
取 消