From 3c288e8b8ed8f94e666001bd95da56a2adbbea43 Mon Sep 17 00:00:00 2001 From: Reza Rahemtola Date: Sat, 29 Mar 2025 03:16:00 +0900 Subject: [PATCH] feat(web_hosting): Adding example of IPFS _redirects file for most use cases --- docs/tools/web3-hosting.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/tools/web3-hosting.md b/docs/tools/web3-hosting.md index e993088..af06828 100644 --- a/docs/tools/web3-hosting.md +++ b/docs/tools/web3-hosting.md @@ -107,6 +107,11 @@ If you want to add more specific redirections, you must create a `_redirects` fi - Simple website: It should be located in the root folder. - Framework-based website: it should be located in the `public` folder. At build time, it will be moved at the root. +A simple default that should work for most websites is to redirect all the traffic to the root using a `200` code (rewrite that doesn't change the URL in the visitor's browser) with: +```txt +/* /index.html 200 +``` + Check out the IPFS documentation below for more details. Useful Links @@ -116,7 +121,7 @@ Check out the IPFS documentation below for more details. ### Backend Support -In order to add a backend to your website and to make it a complete fullstack dapp, there are currently 2 different approchs you can implement: +In order to add a backend to your website and to make it a complete fullstack dapp, there are currently 2 different approaches you can implement: - [Deploy your backend as a function](webconsole/write_your_code.md) using our serverless solution. - [Deploy your instance](../computing/index.md) then setup your environment and expose your APIs to the internet.