setting pagename with rewrite rule

I’m wanting to set the pagename dynamically in a rewrite rule.

I have a theme with a page-template that uses a rewrite rule, but in order for it to work, the pagename has to be set to something specific.


So, in my code, the pagename is set to props. I would like that portion to be set by a $matches[] so that any url that is a page and is trailed by the /s/ matches the rule and sets the mls variable.