Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #1765
Closed
Open
Issue created Mar 08, 2017 by Administrator@rootContributor

Gh-pages deployment problems with react-router

Created by: rockchalkwushock

Added react-router and just a Home page and Page404 to the router. When I navigate to the declared homepage: https://rockchalkwushock.github.io/rcws-development/ I am first being directed to my Page404.

I thought that it was possibly because in the router I have 2 paths / & *:

export default () => (
  <Router history={browserHistory} onUpdate={logPageView}>
    <Route path='/' component={App}>
      <IndexRoute component={Home} />
    </Route>
    <Route path='*' component={Page404} />
  </Router>
);

Seeing that my homepage is pointing to /rcws-development/ I thought perhaps this was the issue; because when I use the redirect button on the Page404 I'm sent to https://rockchalkwushock.github.io/. So I changed my homepage: https://rockchalkwushock.github.io/ but no such luck. I then get Github's 404.

I followed the instructions from the README and went to the following repository after reading that gh-pages does not natively support front-end routing. However I still am first being directed to my Page404 upon visiting the website.

Any ideas why this is? Link to repo

Assignee
Assign to
Time tracking