2015-10-16

I'm trying to create some nice urls for my php search pages.

my current code:

matches /search-jobs with search-jobs.php, great
but it also matches /search-jobs/jobs-in-london to search-jobs.php, but I want it to match the second rule for search-results.php

Why is the first rule always used? and how to fix it?

EDIT:

none of the current answers have worked. I think my issue is that somewhere on my hosting (not accessible by me) there are some defaults set, as if i just go to /search-results, it will automatically use search-results.php file, although I have set nothing telling it to do so?

So, in theory, any /search-jobs(.*) query will automatically use search-jobs.php, seemingly regardless of any rules I create.

anyway, I rearranged my rules to the below.. and I still always hit search-jobs.php file:

Show more