Skip to main content

URL Rewriting

You can use Vercel's Rewrites feature to redirect traffic from a Studio URL to specific paths on your application. When your shoppers visit your site, Vercel fetches the content from Studio and serves it using your URL, even though the content is coming from Studio, allowing you to redirect traffic from one URL to another seamlessly.

You can do this by setting up URL redirection rules within your Vercel project.

Prerequisites

You must configure your project with vercel.json. See Configuring Projects with vercel.json.

You must have Studio installed.

  1. Set up your Studio account.
  2. Once your account is active, contact Elastic Path Support to enable the proxy support tooling for your account.

Rewriting to an external URL

Rewrites allow you to rewrite to an external URL. See the example below.

module.exports = {
async rewrites() {
return [ "rewrites": [
{ "source": "/page/:match*",
"destination": "https://bylt.unstackproxy.com/:match*" }
]
]
}

For more information, see rewrites.