Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bballantyne's avatar

Routing: redirect from contact.php to /contact

I set up a new server with my website and I need to redirect visitors using an old link to a /contact.php page to the new /contact route.

I've added both these lines at the bottom of my web.php file but I only get the message "No input file specified ":

Route::redirect('/contact.php', 'contact');
Route::get('/{page}', [App\Http\Controllers\HomeController::class, 'index'])->where('page', 'contact.php');

From my Googling I gather it may be an nginx or .htaccess issue but I don't know enough to safely edit those. I'm basically at a point where I don't know what I don't know heheh. A nudge in the right direction would be appreciated.

0 likes
2 replies

Please or to participate in this conversation.