mstnorris
1105
20
Forge

Allow certain IP addresses and redirect the rest in Nginx and Forge

Posted 4 years ago by mstnorris

I would like to only allow certain IP addresses to my site while it is still in development and redirect the rest to a different URL or route.

Is this possible using Laravel alone?

If so I would prefer that solution, if not, is there an elegant and easy way to do this with Nginx? I have looked up how to allow / block IP addresses and that works but I am unsure how to redirect the others.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.