Question about how to redirect all users incoming requests to a default page

Hello, i have a personal website and decided to update it and give it a new look. Im planning to send updates to it time to time but i don’t want any users to see initial appearance of my website for now until i finish all needed updates to my site.

So i was thinkin of how can i possibly redirect all incoming requests to a default page?

I used to put a wilcard get "/*default-page" route on top of my routes but now it seems like with the updates in Plug, putting a * is not allowed now and getting error at compilation.

Any other idea? Thanks in advance :pray:

Can you show the error you are getting? It might be the dash in default-page. Have you tried default_page ?

1 Like

Wow. Your suggestion worked! Thanks sir. I really thought the problem was about the use of *

Anyway, here’s what the error message says,

== Compilation error in file lib/my_app_web/router.ex == ** (Plug.Router.InvalidSpecError) globs (*var) cannot be followed by suffixes, got: "*under-maintenance"

But thanks, i’ve changed the dash to underscore and it’s working now :heart: