Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tdondich's avatar

How to redirect default route to another php application

So I wish to migrate my existing website to Laravel but it's quite the undertaking. My goal is to slowly migrate routes over to Laravel. I simply cannot create a default route and have it require the file that bootstraps my existing site because there's just too much conflict. It would be great if somehow I could redirect via the webserver (nginx or apache) so if laravel returns a specific response code that nginx/apache knows to try the request again, but this time with a different php script.

Has anyone tried this? Any thoughts?

0 likes
0 replies

Please or to participate in this conversation.