I'm having a Laravel route that can take infinite number of paths.
Route::get('test/{path?}', calback)->where('path', '.*');
Everything works OK when I use php artisan serve
.
But when I cd to public
and start PHP dev server like this php -S localhost:8002
than I'm having an issue with paths that request a file.
Route like this works still:
/test/something/here
But not like this:
/test/something/here.dd
It seems that PHP dev server right away looks for a static file in public
when there is a dot in the URI and Laravel routes do not even get parsed.
I haven't tested but I assume that Apache, NGIX, IIS, lighttpd and others behave the same.
Is there something I'm missing here or some kind of Laravel workaround which would not require editing servers config files?
What I want is to look in Laravel routes first in all cases.
For reasons I will not get into right now editing server config files is not an option.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2xfi6TF
via IFTTT
Aucun commentaire:
Enregistrer un commentaire