T
T
Twelfth Doctor2017-06-25 15:50:30
Laravel
Twelfth Doctor, 2017-06-25 15:50:30

Why is the route throwing a 404 error?

Hello!
For some reason, this route does not work:

<?php
//рабочий роут
Route::get('/', function()
{
    return 'Hello World';
});
//а этот роут возвращает ошибку 404, когда в адресной строке браузера набираю 

//localhost/my
Route::get('/my' , function() {
    return 'This is my page';
} );

What could be the reason?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Muhammad, 2017-06-25
@verdex

We need to configure the web server so that requests for non-existent files are redirected to index.php. Apache
nginx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question