php - How to add a custom "under maintenance" page?

780

I'm trying to add a custom page to my web application for the times I'm performing maintenance.

I'm trying to test the referred page on my development environment but the Symfony page always appears. I had already created a module with a proper action and template and also configured those on thesettings.yml file.

479

Answer

Solution:

Have you tried this: "Website Temporarily Unavailable" error page

84

Answer

Solution:

In your app's settings.yml set these:

all:
  .settings:
    module_disabled_module: security   # To be called when a user requests 
    module_disabled_action: disabled  # A module disabled in the module.yml

In the module's module.yml set this:

prod: 
  enabled:     false

This will disable the your module for prod environment, but it will still be available for dev and test environments.

Hope it helps. Regards, Radu.

People are also looking for solutions to the problem: PDO and PHP OOP Code Advice

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.