simplePHPRouter icon indicating copy to clipboard operation
simplePHPRouter copied to clipboard

URI with symbols

Open mfoland90 opened this issue 2 years ago • 1 comments

I am making a Request Feedback system, and I have a uri like this: https://requests.steadfastinnovations.com/dev/idea/get-requesttrak-up!

It's acting as that isn't found. I haven't messed with Regex. How would I allow a symbol like an exclamation point in the uri?

mfoland90 avatar Sep 28 '23 05:09 mfoland90

Never mind, I've had to add the regex code. Route::add('/idea/([a-zA-Z0-9-!?]*)', function($slug) { require ROOTDIR . '/views/topic.php'; }, ['get','post']);

mfoland90 avatar Sep 28 '23 06:09 mfoland90