redirect – Create a permalink to a pdf?

Question

I have a website where I want the permalink to my resume to be www.example.com/resume, so that whenever I send someone that link, it goes to the most recent version of my resume. But I don’t want my resume to be a webpage — I just want the permalink to send people to a PDF file, say http://www.example.com/wp-content/uploads/2021/07/Resume-v4.pdf. This way people with the www.xyz.com/resume link always see the most recent version, regardless of when I sent it.

If possible, I’d also like to be able to redirect people who have the link http://www.example.com/wp-content/uploads/2021/07/Resume-v4.pdf to be redirected to www.xyz.com/resume, and then sent to the newest version of the file.

I’ve tried using a few plugins for this, but nothing seems to be able to generate permalinks for media files. Does anyone know how to do this?

in progress 0
Catlard 2 months 2021-07-28T15:38:53-05:00 0 Answer 0 views 0

Answer ( 1 )

    0
    2021-07-30T03:27:59-05:00

    You can accomplish the first part using the Quick Page/Post Redirect Plugin. Just set the Request URL to /resume and the Destination URL to /wp-content/uploads/2021/07/Resume-v4.pdf

    For the second part of your question, you can add a redirect rule to your .htaccess file:

    Redirect /wp-content/uploads/2021/07/Resume-old.pdf /resume

    The way you worded your question you actually would set up an infinite redirect, so I changed it here to “Resume-old.pdf”.

Leave an answer

Browse
Browse