Google Sites – How to Redirect a Page to a Google Drive File

google-drivegoogle-sites

Suppose I have a Google Sites such as https://sites.google.com/site/mysite/. I want to create a URL associated with the site (say https://sites.google.com/site/mysite/gdrivedoc) that takes anybody who enters that URL directly to a shared file in my Google Drive. I do not want to embed the document on the Google site. I find that solution inelegant. I am only asking about methods of achieving this functionality, or similar, through the Google Sites application.

Obviously I can get the link for the shared file easily in Drive, but then how can I have a page on my Google Sites automatically redirect to that link?

Or is there an alternative way of getting that same functionality?

Best Answer

At this time Google Sites app doesn't include a way to set URL redirection.

It's worth to note that JavaScript could not be used for URL redirection as it only could be added by using the HTML Box gadget or by a Google Apps Script web app but they are included inside iframes and could satinized.

References