Testuser9 what are you trying to do?
To completely disable access to the forum while you update dependencies or run backups, you can set offline in config.php https://discuss.flarum.org/d/19988-how-to-enable-site-maintenance/2
To block access to newcomers while your staffs sets up the forum content, you can disable sign up or use an extension to control registrations.
To set up a temporary page while you move around Flarum files, I recommend using your host settings if they have any. If you serve a completely different page, there's no risk for the user to encounter 500 errors while hitting Flarum's index.php during file manipulations.
There's also a paid extension with more advanced maintenance mode features https://discuss.flarum.org/d/23930-maintenance-mode