Switching my php coded site to laravel framework

Hey, friends, I am switching from core PHP to laravel framework and everything works fine but the main problem is that my old version of the site is based on this URL pattern


And my new laravel project URL is something like this


And if I change my site to laravel then it affects my SEO due to these different URL patterns…

my question is that how to redirect the ugly URL to laravel URL… Is there anything present in laravel to do this

Any help or recommendation will highly be appreciated…

1 Comment

Team CodeForHost (November 7, 2019)

On your route define, just set your URL to apk.php. Something like this

Route::get('apk.php', [YourControllerClass, 'index'])->name('routeName');

And to generate the url for HTML, you need to pass app in param

route('routeName', ["app" => "garena-contra-returns"])

Leave A Comment

What’s happening in your mind about this post !