anitab-org / anitab-org/stem-diverse-tv-cms

Bug: 404 Page Not Found on refreshing a page on gh-pages

Ouverte
#48 16 commentaires 0 réactions 1 personne assignée Réclamée par @Aryamanz29 Voir sur GitHub
Category: Outreach/Research Type: Bug
Langage dominant
TypeScript
Étoiles
4
Forks
23
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Describe the bug

We get a `404 Page Not Found` error when refreshing a page. Actually, this happens because github pages doesn't supports single page apps. It doesn't have access to front-end routes.

### To Reproduce
Steps to reproduce the behavior:
1. Go to https://anitab-org.github.io/stem-diverse-tv-cms/login
2. Refresh the page
4. See error

### Expected behavior

We should not get a 404 error and should be redirected to the same page.
A solution I saw was to add a 404.html file to add under the public folder which redirects back to index.html. Although not sure if it will work for us or not.

##### Feel free to `research` on this find the best possible solution.

### Screenshots

![stem-404](https://user-images.githubusercontent.com/54268438/111920159-83cd9700-8ab3-11eb-9470-bc1659669798.gif)

### Desktop (please complete the following information):
- OS: Any
- Browser: Any
- Version: Any

### Additional context

For reference, you can see the implementation [here](https://github.com/milosrancic/reactjs-website).

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.