.htaccess and proxy settings for routing a decoupled REST API consuming theme
Developing a decoupled front-end consuming the REST API...
I'm using create-react-app so can enter a proxy field corresponding to WP in my package.json and write my calls like fetch('/wp-json/v2/pages/...') if I run yarn start from the front-end directory...
I'd love to actually have this theme in my wp-content/themes/my-theme directory though
I'm no .htaccess god
How can I make so that:
- Generic requests like
mysite.com/jibble/jabbleare handled by my SPA routing - Protected routes like
mysite.com/wp-admin/*andmysite.com/wp-content/uploads/*are still handled by Apache
Topic plugin-json-api rest-api htaccess api theme-development Wordpress
Category Web