maccman/spine — Issue #168: pushState: how to avoiding 404s 
Author: gr2m
Created: 2011-12-29 15:22:32+00:00
State: open

I want to use pushState in my projects but cannot a page directly, as the server only knows the root path.

What I usually do is a fallback route. When no static file can be found, return the root path. I looked into the hem repository and tried to implement that, but was not able to.

What do you think about it? Maybe you could add some url rewriting features to `slug.js` options? Something like:

```
{
"rewrites": {
'/old_path': '/new_path',
'*': '/'
}
}
```

The problem is, that some rewrites should be applied before and some after the stratajs routing and middlewares ... Maybe a root_fallback option?

I don't know, but maybe there is a simpler way to achieve it? What do you think?