I'm having quite an issue deploying my react app to a sub-directory on appache. I am using create-react-app and React router v4. When i visit the Url www.example.com/myApp. the html i am rendering as my homepage gets rendered properly.
But if i try to visit the register page by typing the route manually in the address bar, i get a 404 Not found error.
What i have done.
- I have set the basname of my BrowserRouter to the subdirectory.
- I have also set the homepage property in package.json.
- I have created .htaccess file.
Please i have been at this for days trying to figure out what i am doing wrong but i can not seem to figure it out.