dokploy icon indicating copy to clipboard operation
dokploy copied to clipboard

URL Rewrite support

Open NekoMio opened this issue 8 months ago • 3 comments

What problem will this feature address?

I am using Dokploy to deploy a slidev site, and according to its documentation, I need a rewrite when deploying static files. Just like this

{
  "rewrites": [
    { "source": "/(.*)", "destination": "/index.html" }
  ]
}

Describe the solution you'd like

I would like to add a UI similar to the Redirect to configure this.

Describe alternatives you've considered

I now do this by manually configuring the traefik configuration file, but feel like this may be a common feature

Additional context

Middleware configuration files I used

middlewares:
  test-replacepathregex:
    replacePathRegex:
      regex: ^/(.*)
      replacement: /index.html

Will you send a PR to implement it?

Maybe, need help

NekoMio avatar Apr 13 '25 10:04 NekoMio

Rewrites would be a nice feature indeed. We are also now manually updating the Traefik config to rewrite requests to /api/* on one service and forward them to another service (which is not exposed to the public). It works just fine, but a standard way to do this would be great.

arpadgabor avatar Apr 17 '25 10:04 arpadgabor

agree, this could be very helpful

cemates avatar Apr 23 '25 12:04 cemates

+1 for i18n static website, I need { "rewrites": [ { "source": "/en", "destination": "/en.html" } ] }

AllenRay456 avatar May 10 '25 23:05 AllenRay456

Are there any updates?

Giasinit avatar Jun 04 '25 21:06 Giasinit