Skip to content

Fallback Route gets ignored #54338

@Jubeki

Description

@Jubeki

Laravel Version

11.39.1

PHP Version

8.3.16

Database Driver & Version

sqlite

Description

Visiting the path /%c0 on a fresh laravel application results in the fallback route being ignored and the default 404 page will instead be displayed.

This does not only apply to the fallback route but also to wildcard routes.

Route::get('/{path}', fn() => 'Test Wildcard')->where('path', '.*');
Route::fallback(fn() => 'Test Fallback');

Originally discovered in statamic: statamic/cms#11387

Steps To Reproduce

  1. Create a new Laravel Application
  2. Create the following route: Route::fallback(fn() => 'Test');
  3. Visit http://localhost:8000/awd (you will see Test, meaning the fallback route gets registered)
  4. Visit http://localhost:8000/%c0 (you will see the 404 page, which is unexpected)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions