Phpmyadmin subpath redirect

Hello All,

I have problem probably with my middleware.

I would like to have a phpmyadmin in a subpath /myadmin.
It works until the login, but when user logged in it redirects me back to domain/index.php and that if course gives a 404.

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  annotations:
    kubernetes.io/ingress.class: traefik
  name: phpmyadmin
  namespace: default
spec:
  entryPoints: []
  routes:
  - kind: Rule
    match: Host(`domain`) && PathPrefix(`/phpmyadmin`)
    middlewares:
    - name: replace-path-phpmyadmin
      namespace: default
    priority: 0
    services:
    - kind: Service
      name: phpmyadmin
      namespace: default
      port: 80
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: replace-path-phpmyadmin
  namespace: default
spec:
  replacePathRegex:
    regex: ^/phpmyadmin(.*)
    replacement: ${1}

What I did wrong ? thanks

I don't understand what you're trying to do --

Replace domain/myadmin with domain/phpmyadmin??

I have a domain example.domain.com and I have multiple services behindf that and our policy is not use them as service_prefix.example.domain.com, but example.domain.com/service. In many apps I could set that it listens under subpath, but there is no option for phpmyadmin and kubernetes dashboard.
With Kubernetes dashboard ot works this solution. But it does not work with phpmyadmin.
In nutshell. I would like to modify the response path from domain to domain/phpmyadmin. because I can access the phpmyadmin under /phpmyadmin but when I login in the response I see domain only

Look at Docker Hub

You have to set phpmyadmin container env variable PMA_ABSOLUTE_URI to https://domain/myadmin/