Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How to convert vercel to nginx rewrite rule
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How to convert vercel to nginx rewrite rule

There's a script I want to use but its designed to be deployed on vercel which I don't want to use but I want to host it on my server since it's cheaper. I'm not familiar with vercel so how do I convert vercel rewrite to nginx rewrite rules? I can't find tools that can convert vercel to nginx but could only find apache to nginx. It would be helpful if someone can give me an example or convert it for me.

{
  "rewrites": [
    {
      "source": "/:__PREFIX(~|-|image)/:__PATH(.+)",
      "destination": "/api/image"
    },
    {
      "source": "/:__PREFIX(ajax|rpc|.+\\.php)/:__PATH*",
      "destination": "/api/http"
    }
  ],
  "headers": [
    {
      "source": "/(api|ajax|rpc|.+\\.php)(.*)",
      "headers": [
        {
          "key": "Access-Control-Allow-Origin",
          "value": "*"
        }
      ]
    }
  ]
}
Sign In or Register to comment.