Skip to content
This repository has been archived by the owner on Apr 20, 2019. It is now read-only.

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
guardrex committed Apr 6, 2018
1 parent 982fc2f commit 6bb1b1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/host-and-deploy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Because browsers make requests to Internet-based hosts for client-side pages, we

The app base path is the virtual app root path on the server. For example, an app that resides on the Contoso server in a virtual folder at `/CoolBlazorApp` is reached at `https://www.contoso.com/CoolBlazorApp` and has a virtual base path of `/CoolBlazorApp`. By setting the app base path to `/CoolBlazorApp`, the app is made aware of where it virtually resides on the server. The app can use the app base path to construct URLs relative to the app root from a component that isn't in the root directory. This allows components that exist at different levels of a directory structure to correctly build links to other resources at locations throughout the app.

In many hosting scenarios, the server's virtual path to the app is the root of the app. In these cases, the app base path is `/`, which is the default configuration for a Blazor app. In other hosting scenarios, such as GitHub Pages and IIS virtual directories, the app base path must be set to the server's virtual path to the app. To set the Blazor app's base path, update the **\<base>** tag in *index.html* from `/` to `/<virtual_path>`, where `<virtual_path>` is the full virtual app root path on the server for the app.
In many hosting scenarios, the server's virtual path to the app is the root of the app. In these cases, the app base path is `/`, which is the default configuration for a Blazor app. In other hosting scenarios, such as GitHub Pages and IIS virtual directories, the app base path must be set to the server's virtual path to the app. To set the Blazor app's base path, update the **\<base>** tag in *index.html* from `href="/"` to `href="/<virtual_path>"`, where `<virtual_path>` is the full virtual app root path on the server for the app.

## Static hosting strategies for standalone apps

Expand Down Expand Up @@ -177,4 +177,4 @@ COPY nginx.conf /etc/nginx/nginx.conf

To handle URL rewrites, add a *404.html* file with a script that handles redirecting the request to the *index.html* page. For an example implementation provided by the community, see [Single Page Apps for GitHub Pages](http://spa-github-pages.rafrex.com/) ([rafrex/spa-github-pages on GitHub](https://github.com/rafrex/spa-github-pages#readme)). An example using the community approach can be seen at [blazor-demo/blazor-demo.github.io on GitHub](https://github.com/blazor-demo/blazor-demo.github.io) ([live site](https://blazor-demo.github.io/)).

When using a project site instead of an organization site, update the **\<base>** tag in *index.html* from `/` to `/<repo-name>`.
When using a project site instead of an organization site, update the **\<base>** tag in *index.html* from `href="/"` to `href="/<repo-name>"`.

0 comments on commit 6bb1b1f

Please sign in to comment.