rewrite rule generated with mpdf to a shorter version

Question

I’m saving some pdfs into a folder with mpdf, the urls of pdfs are like this:

https://example.com/wp-content/themes/mysitetheme/invoices/invoice_8937.pdf

I want that if someone open this url it will show a shorter version like this:

https://example.com/invoice_8937.pdf

how can I obtain this result using add_rewrite_rule() ?

0
silvered.dragon 2 months 0 Answers 11 views 0

Leave an answer