Skip to content

Redirect Regex

The Redirect Regex middleware redirects a request using regex matching and replacement.

In the Regex field enter the capturing regex expression In the Replacement enter the URL to redirect to.

Creating the middleware on traefik

Edit your existing traefik install (or install fresh if you don’t have it installed)

  • Scroll down to redirectRegex

  • Click Add

  • Name: guacamole-redirect (Any name you want, remember it, you will need it later)

  • Regex: ^https://remote\.domain\.com/?$

  • Replacement:

  • Check Permanent

  • Click Save


This will capture or and redirect it to

Applying the regex redirect middleware to the app

Edit your existing App, in this example we will use guacamole-client.

  • Scroll down to Traefik MIddlewares (Remember, you need to have ingress enabled)

  • Click Add

  • Name: guacamole-redirect (Replace with the name you gave to your middleware on the previous step)

  • Click Save


You are ready!