futurepress / react-native-static-server

HTTP static file server for React Native
MIT License
360 stars 183 forks source link

Redirection #49

Closed andrepcg closed 5 years ago

andrepcg commented 5 years ago

Is there any way to redirect all requests to index.html, for example? Or any other approach to this?

fchasen commented 5 years ago

It's certainly possible with the underlying native libraries, but not sure how the static server could expose those features / what the use case is.

Going to close this for now, but open to suggestions on the topic.

pranavkaushik9 commented 4 years ago

@fchasen One such use case can be to support SPA client side routes. For example any request for /users/info should also be redirected to index.html

@andrepcg How did you solve this for your need?