douqiao5440 2017-08-03 11:00
浏览 264

多个项目的nginx设置,包括使用browserhistory反应SPA

Currently I have three projects which I want to run on same domain.

root directory /home/theme (html + css + php )

1st directory /home/community (React with browserhistory, so all path should redirect to index.html)

2nd directory /home/api (node express)

domain name wwww.xyz.com

so www.example.com/community/* should riderct to community directory.

But browserHistory.replace('/login') redirect me to www.example.com/login instead of www.example.com/community/login.

Also the domain www.example.com.anything/else/here/community/ should redirect to http://www.example.com/anything/else/here/community/login using react routing, http://www.example.com/anything/else/here/ should point to theme directory and http://www.example.com/anything/else/here/api should point to api directory

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 求图像处理的matlab方案
    • ¥50 winform中使用edge的Kiosk模式
    • ¥15 关于#python#的问题:功能监听网页
    • ¥15 怎么让wx群机器人发送音乐
    • ¥15 fesafe材料库问题
    • ¥35 beats蓝牙耳机怎么查看日志
    • ¥15 Fluent齿轮搅油
    • ¥15 八爪鱼爬数据为什么自己停了
    • ¥15 交替优化波束形成和ris反射角使保密速率最大化
    • ¥15 树莓派与pix飞控通信