Escape a route for old website

Hello I’m really novice in Slim and I probably ask a stupid question, but…

If I want to keep an old website and I develop a new one with slim (3)… How could I escape all routes of that old website (and its links)

For exemple,
/myoldwebsite/index.php is totaly written in php with no REST structure or Model/view/controller…
Can I keep it ?

Thank you for any answer!

Hey @kilden, not exactly what you mean by ‘escape’ in this context, but it sounds like your overall goal is to get your legacy PHP application to work within Slim so that you can set up new routes alongside it – is that what you’re trying to do?

To accomplish this, you can set up a sort of catch-all route which catches any requests that don’t match any of your other (new) routes. This catch-all route then hands the request off to controller or utilizes route middleware to open up an output buffer, run your legacy script (saving any output it generates into the output buffer), write that output to the body of your response, and send the response off.

If this sounds like what you are hoping to accomplish, checkout this thread where @odan helps me out with this same issue for a starting point.