Conflict with React Router in subfolder
-
I have a WordPress install on the root of my apache server. I’ve built a photo gallery in React which is in the subdirectory /gallery. The gallery home page load properly. If I try to go to any other URL’s in the React app however, WordPress’s rewrite settings take over.
For instance, there’s a React route for the latest images, which is at /latest. So it would be http://www.site.com/gallery/latest.
Wordpress takes over that URL and is showing a blog post with the word “latest” in the title.
I’ve tried changing WP’s permalinks to plain, and that results in a 404 page for the React routes.
Is it possible for React and WP to play nicely together with regards to this routing issue?
The topic ‘Conflict with React Router in subfolder’ is closed to new replies.