I am having problem redirecting my clients to some address.
For example, the client go to this url, " http://localhost:3000/home ". If the client go to " http://localhost:3000/msg " using this code,
<a href="msg" >Link</a>
It is working. But when the client from " http://localhost:3000/people/231233213123 " and the client click the link with this code,
<a href="msg">Link</a>
It will go to " http://localhost:3000/people/231233213123/msg ".
I need to make the client go to " http://localhost:3000/msg ".
I tried usin this code,
<a href="../../msg">Link</a>
But it will redirect to " http://localhost:3000/people/msg ".
I am using Flow router in React and Meteor.
您需要在网址前加一个斜杠:
<a href="/msg">Link</a>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.