Forum Moderators: phranque
app.example.com/second-section?page=1 appname.example.com?page=1 I assume that moving the subfolder to a subdomain will as simple as a 301 redirect from one to the other.
I think where things will get complicated is getting the React server to play nice with the existing one.
i would ... make the resulting urls as simple/short as possible.
Since you're redirecting anyway, this would seem the right time to come up with new prettier URLs, without any messy query string.
you could configure another rest.example.com subdomain with suitable authentication as your REST API server to keep things separate and secure.
Prettified URLs are typically accompanied by an internal rewrite that changes the various bits of the URL back into parameters.
//whether my URL is:
example.com/<param1>/<param2>/<param3>/<param4>/...
//or
example.com?param1=someVal¶m2=someVal2¶m3=someVal3....
//but in my case what I am doing is:
example.com?param1=someVal¶m2=someVal2¶m1=someOtherVal¶m2=someOtherVal2...
//which I read in my code:
param1 = [someVal, someOtherVal]
param2 = [someVal2, someOtherVal2]
<Virtualhost *:443>
#typical virtualhost stuff
<Directory /var/www/....>
#typical directory stuff
</Directory>
<Location /my-react.app>
proxyPass "https://app.example.com/my-react.app"
</ Location>
<Location /static/js>
proxyPass "https://app.example.com/static/js"
</ Location>
<Location /static/css>
proxyPass "https://app.example.com/static/css"
</ Location>
</ Virtualhost>