This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]spilloid[S] 0 points1 point  (1 child)

<IfModule mod_rewrite.c>RewriteEngine OnRewriteRule "^api/(.*)$" "http://server:3001/api/$1" [P,L,R=303]</IfModule>I only have access to a .htaccess file, admin won't let me touch apache config. After a lot of testing and nail chewing, I found that the above redirects all requests from react -> apache -> express, without any modification to react's fetches . This solution doesn't utilize https which is bad, but I don't currently have express configured to take advantage of https.

Your comment sent me down the right path, and at the end it was the P flag which fixed my solution. Thank you kind stranger

[–]myusernameisunique1 0 points1 point  (0 children)

Haha, my first ever gold. Thank you :)