Is there a way to change the redirection behavior for website hosting?

The Google Cloud Storage documentation for setting up a website indicates that when a user requests a page without a slash, a slash is inserted for the user.

The resulting behavior in practice is that it redirects directly to the MainPageSuffix page, rather than just adding a slash.

So, for example, if you have a bucket with the MainPageSuffix parameter set to 'index.html' and you have the file /folder/index.html. Visit / folder / will serve the file directly, but when you visit / folder, 301 will redirect you to /folder/index.html instead of / folder /.

Is it possible to configure or somehow force / the folder to redirect you to / folder / instead of directly accessing the file?

+6
source share

All Articles