A solution would be great for 1.15 obviously but I am now learning Yii2 and it would be great to know how to solve this sooner rather than later!
I’ve read its recommended to set up the rest api as a separate application which is fine but it would be great to know how to route URLs containing the escaped fragment correctly
Still searching for some help here - think it’s really important to be able to use Yii(2) as the back end for a single page web appplication using (eg) Angular or Ember.
To make the spa crawlable without relying on push state, I need to include the ?_escaped_fragment in the url. I couldn’t get this to work on Yii1 and still can’t on Yii2. I need to have pretty urls and remove the scriptName in the urlManager but if you do this it doesnt work at all - no routes can be reached.
Have tried using
'routeParam' => '_escaped_fragment',
in my urlManager but that obviously only works with pretty urls turned off
Hi Sam, many thanks for getting back. I’m solving it by writing a custom Url rule, which extracts the ?_escaped_fragment from the request, and then the route and action turning