Redirect page to pdf file

Permalink
Hi folks,
I've done quite an extensive search, and can't find an answer to my problem. It's a somewhat odd situation, but pretty much out of my hands.
I need to redirect a page, eghttp://mysite.com/somepage/ to a pdf file, so that when someone visits that page, what they get is the pdf file immediately (they'll be expecting it), rather than a page with the file available for download via a link on the page.
Now, the pdf file is already in the file manager, but quite happy to put it somewhere else on my web server if that aids the cause.
Can this be done in C5? Likewise, if there is another way of doing it outside of C5, I'd be happy to do that too.

Cheers,
Richard

stretchrt
 
Steevb replied on at Permalink Reply
Steevb
Try placing the file in maybe a pdf directory on your server and use an 'iframe'.

<iframe src="site.com/pdf/file.pdf" width="600" height="900">
keeasti replied on at Permalink Reply
keeasti
I would try adding an external link in Sitemap and point that to the PDF url. Haven't tried it but it should work.

Edit - just tried it and it works.
stretchrt replied on at Permalink Reply
stretchrt
It works, but it doesn't work how I want - ie you can't hide the external link from autonav. I don't want it showing anywhere in the site. At the moment I've put a meta refresh in the header of the page, which is kinda doing the trick if you don't mind the blank page showing briefly before it redirects to the pdf.
keeasti replied on at Permalink Reply
keeasti
Hmmm ... bit confused as to what you want to achieve. Do you just want to link to a PDF which you have uploaded without the link showing anywhere in the site ... ie. you furnish it to users as needed?

Edit - OK, I think I understand what you want to achieve. All you need to do is add the 'Exclude from Nav' attribute to the external link in the sitemap.

For some reason one can't seem do this directly in the sitemap but you can if you use the Page Search function to find the external link 'page' and then click on it to add the attribute that way.

See here as well for some thoughts on this:

http://www.concrete5.org/community/forums/usage/hide-external-link-...
stretchrt replied on at Permalink Reply
stretchrt
Yes that's exactly it - and the link has already been predefined in a printed document so no opportunity to change it.
keeasti replied on at Permalink Reply
keeasti
Just edited my previous post with a way to achieve this. The PHP redirect method works as well of course ... I'd use whatever is easiest to implement really.
stretchrt replied on at Permalink Reply
stretchrt
Did a bit more searching, and found this that works:

http://www.concrete5.org/community/forums/documentation_efforts/how...

Cheers and thanks for your efforts.