[Solved] Everything seems in place for CORS, but /whatever/:filter always returns 404

Using apache, mod rewrite on, AllowOverride All is set. Headers seem to be fine.

Here’s what I have:
$app->options('/api/v1/profiles/:filter+', function ($request, $response, $args){ ... stuff where headers get set. not the problem, read below. I did have ...$args, $filter){ at one point. Made no diff. also note; I did have /:filter', without the +, made no diff });

Then, the actual call, which never gets called because the above is 404:
$app->get('/api/v1/profiles/:filter', function ($request, $response, $args, $filter = '*'){

Interesting note, if I hardcode what I’m filtering into the place of /:filter I don’t get a 404 and it passes it over to the actual call. Which means my call from angular seems fine… just the :filter isn’t being dynamically replaced. Am I screwing up the syntax here or something?

Also should be noted I already have another call that works fine. It’s a return for all of some specific thing to create a feed, so I didn’t have any /:whatever in it. Same setup with the options call (sans params) etc. Works.

I’ve gotta be missing something!

FYI. I just changed :filter to {filter} and it passes. Still doesn’t explain why :/filter didn’t work. Isn’t it suppose to?

Seems to still not “really” work though. It does get past the OPTIONS call, but doesn’t recognize {filter} in the other one. I was pretty sure this is how I had done it in the past. Probably doing something totally goofy.

UPDATE:
In Slim 3, putting $filter as the last parameter is NOT how to do it. I missed this; but you use args[‘filter’] to get it. So, with {filter} and pulling it from $args (which makes sense to me now) I’ve gotten past this question. Hope this helps someone.

:filter is the Slim v2 style of route params it will not work in slim 3.