global
    lua-load /path/to/urlencode.lua

frontend fe_main
    bind :80
    
    # URL encode the company name and store it in variable.
    # In practice, you could get a company ID from a cookie
    # or URL parameter and then find the name via a map file.
    http-request set-var(req.company) str("Vinyl & Rare Music"),lua.urlencode
    
    # Redirect to new URL
    http-request redirect prefix http://%[req.hdr(Host)]/%[var(req.company)] if { var(req.company) -m found } { path / }
    default_backend be_servers