Never used it but have you tried just adding slashes?
Route::permanentRedirect ('/catalog', '/gallery');
Also try this
Route::permanentRedirect ('/catalog/{any}', 'gallery')->where('any', '.*');
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I created new website for my client and a created permanent redirect for addresses that had different names on the previous site:
E.g. so I have redirection in my code from the original url (catalog) to the new url (gallery):
Route :: permanentRedirect ('catalog', 'gallery');
mysite.com/catalog redirects correctly to mysite.com/gallery
The problem is that search engines (ex. google.com) have addresses that have a slash at the end, and here's the problem.
mysite.com/catalog/ (with trailing slash) redirects incorrectly to mysite.com/catalog/gallery
and of course there is no such page on the web.
What am I doing wrong? Big thanks for your help.
Please or to participate in this conversation.