Redirect domain.com/path to domain.com

Hello,

I’m trying to figure out how to redirect domain.com/path to domain.com.

I have a backuppc installation and I access it through “domain.com/backuppc”. I’m using haproxy for jenkins and nextcloud and I would like to access backuppc admin interface through haproxy by using backups.domain.com but I couldn’t figure out how to do that. Can you please help?

Thanks.

My current config looks like that:

frontend web-fe
    mode http
    bind :80
    bind :443 ssl crt /etc/letsencrypt/live/domain.com/domain.com.pem
    http-request redirect scheme https unless { ssl_fc }
    use_backend jenkins if { hdr(host) -i jenkins.domain.com }
    use_backend nextcloud if { hdr(host) -i cloud.domain.com }
    use_backend backups if { hdr(host) -i backups.domain.com }

    default_backend webdefault


backend webdefault
        option httpclose
        option forwardfor
                server haproxy localhost:81 check

backend jenkins
	option httpclose
	option forwardfor
		server jenkins 192.168.1.18:8080 check

backend nextcloud
        option httpclose
        option forwardfor
                server nextcloud 192.168.1.20:80 check

backend backups
        option httpclose
        option forwardfor
                server backups 192.168.1.14:80 check