0
Hello,
I am configuring an application on a cPanel server. The backend was developed in Node JS and will be published in a URL with the following format: https://teste.com/api;
The frontend was developed in React JS and will be published in the URL https://teste.com
The . htaccess file has been configured this way, according to documentation (Create React App)
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]
The question is how can I set the . htaccess file to redirect to index.html (as it already does), except for when the requested URL is https://teste.com/api/qualquercoisa ?
Thank you,
I didn’t know they used . htacces with nodejs. For me . htacces was only used with apache.
– Augusto Vasques
@Augustovasques, apache yes! I am publishing a Node application on the apache server.
– Eduardo Romanini
You are using the /api with an apache-proxy?!
– Guilherme HD