you could place them with in your .htaccess file as 301 Redirects.
Redirect 301 /old-file-url.php http://www.website/the-new-url
Redirect 301 /folder/anothersomething.php http://www.website/the-new-url/new-url
Hope this helps
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi everyone, I'm migrating an old plain php website to Laravel, everything works fine except one small thing. Evey time I port an old website to Laravel I'm facing the same problem : keeping the old urls working cause the customer already shared on the net, social and so on, and rightly he doesn't want to loose the seo work he has done.
Right now I've created an array of old urls -> new urls and create the routes with redirects in a simpel foreach loop.
Is there a "best practice" to handle this situation? Changing the .htaccess? (even if I prefer the customer to be able to edit the redirects array) Some kind of library?
And finally, is there a simpe way to allow some urls like http://ww.website.com/folder/something.php to pass through the routing untouched (running the something.php) and at the same time redirecting http://www.website.com/folder/anothersomething.php to a Laravel route?
Please or to participate in this conversation.