luceos This happens when your rewrite rules aren't correctly set up. Make sure that mod rewrite is enabled.
Wleksion luceos I did what you said and it fixed the problem, thanks a lot. But now I have another problem: I can only open the site as example.com/public, how do we do this as example.com?
katos You are also using /public/ which you shouldn't be doing - you need to set your documentroot to /public/ 🙂
luceos Wleksion change the documentroot to include the public path, check customizing paths in the Flarum installation docs.