Add redirects and rewrite rules to your projects
To configure redirects or rewrite rules for your Webpop projects, go to the project dashboard and use the "Redirects" tab. There you'll see a text editor that lets you configure both redirects and rewrite rule in a simple format.
Setting up basic redirects is dead simple:
Just list the original path followed by the new path or URL.
You can specify the HTTP status code for the rewrite. The default is 301 which will do a permanent redirect.
/home / 301
/my-redirect / 302
/pass-through /index.html 200
/ecommerce /store-closed 404
When the status code is 301, 302 or 303 BitBalloon will redirect to the target url. With any other status code BitBalloon will render the target url with the specified status code. This means that you can define rewrite rules as well as redirects by specifying 200 as the status code.
You can use placeholders in the origin and target paths:
This would redirect a url like
An asterisk indicates a splat that will match anything that follows:
/* /index.html 200
Will serve the home page for any path with 200 as status code. This can be really useful for angular apps or other one-page apps using history pushstate. You can use the splat in your rewrites or redirects like this:
This would redirects paths like
Matching on Query Parameters
You can also match on query parameters:
/blog post=:slug /blog/:slug
In this case the path
/blog?post=my-blog-post would redirect to