I’m having trouble setting up the rule for the route I want correctly.
I have a SiteController action called “team”, so normally the route is localhost/site/team. I added this rule:
'team' => 'site/team'
So that the url will appear as localhost/team, but there’s also html sections that I navigate to with ’ #text ’ so instead of ‘site/team’, it’s ‘site/team/#text’ but that brings me to localhost/site/team/text# and I want it to also appear as ’ localhost/team/#text ’
I’ve tried a variety of rules like this:
'team/<id:\#[.*]>' => 'site/team/<id>'
The regular expression should match #text but it gives me a 404 error for localhost/team/#text. I’ve tried other regular expressions but can’t find one that works. Any help is appreciated