Static react app in Wordpress without htaccess router not working

Viewed 13

I have a react app in a folder of my Wordpress install that uses routes. The host we use has removed .htaccess support and I'm trying to get something to work via add_rewrite_rule without much luck. Here's what I've tried without luck:

add_action( 'init', 'my_custom_app_rewrite_rule' );

function my_custom_app_rewrite_rule() {
   add_rewrite_rule('^apps/myapp/(.+)?', 'apps/myapp/index.html', 'top');
}
0 Answers
Related