state.source.urlpoints to that location.
state.source.redirectionsaccepts the following values:
RegExp:. This pattern will be matched against the current route and if matched, Frontity will make an additional request to the WordPress instance to check if there exists a redirection for that route. Note that the shorthand character classes will have to be escaped, so for example instead of
\d, you will need to write
"RegExp:"which represent regular expressions. An additional request will be sent to Wordpress to check for the redirection if any of the regular expressions match the current route. If the array also contains a
"404", an additional request will also be made if the original request has returned a 404.
state.source.redirectionswhich is used to handle the redirections. The recommended way of using it is by setting it in your
state.source.redirectionsaccepts the options outlined above.
RedirectionDataobject for the current route:
actions.source.fetch(). If the setting for
state.source.redirectionscontains an "eager" value (for example if it equals
"all") it is fetched before calling the handler for the current route. "Fetching a redirection" refers to making a request to the WordPress instance to check if a redirection exists for a particular URL.
RedirectionDataobject instead of a "typical"
AuthorData. This object contains all the information about a redirection that Frontity needs in order to handle it. You can check the type of
RedirectionDatato see all of its properties.
RedirectionDataobject is in the state, the behavior of Frontity is different on client and server.
tiny-router. If that object contains a redirection, Frontity will set the correct HTTP status, and redirect using
data.locationcontains the final URL .
state.source.dataobject and if the
dataobject for current route contains a redirection, Frontity calls
data.locationcontains the final URL.