How to redirect a URL (static directory file) to an object in GCS?

66 views
Skip to first unread message

Paul Canning

unread,
Mar 25, 2015, 12:18:06 PM3/25/15
to google-a...@googlegroups.com
I have a static file in my app that ideally needs to sit in a bucket in GCS.

Unfortunately, there are old references to the direct URL, so I am unable to use the GCS public URL.

How can I redirect (think htaccess 301) the static file URL to the GCS object URL?

Example:

Mars Lan

unread,
Mar 27, 2015, 7:47:59 PM3/27/15
to google-a...@googlegroups.com
Assuming you're using PHP, you can create a script that handles /folder/.* and responses with the corresponding redirection headers to GCS objects.
Reply all
Reply to author
Forward
0 new messages