Ah, I see. So, the wallet has to be located on the same server as the invoice? There's no way to redirect?
Discussion
There are ways but like anything else with trade offs. If you can communicate with the wallet someway (like NWC) outside of http, the web server could fetch an invoice on behalf of the wallet.
If the receiving wallet is offline/unreachable - things get more tricky. Zeus does something with holdinvoices to let self-custodial wallet users claim the funds when they come online.
There always needs to be some coordination between the eventual receiver and the web server though.