I need to change the page name in my laravel project. I need a help
page name
**about ** to best-courier-company-in-uae
like this in the url.
about is a blade file with html inside.
can we change this page name without running the artisan?
i tried to change the name from web.php routing but its not changing.
`Route::redirect(‘/about’, ‘/best-courier-company-in-uae’, 301);
Route::get(‘/best-courier-company-in-uae’, function () {
return view(‘about’);
});`
2
Answers
I changed the page name url from routes cache into the new name and it worked. redirect from htaccess old url into new url. add redirect from routes file. enter image description here
I assume that you mention the route
/best-courier-company-in-uae
is defined after the redirection, so put it before the redirect routeIt may be works, Thanks later