You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to navigate to the dynamic page without reloading. The example above is the way I made the link. In the local environment, it works fine. But when I deploy to apache server the page reloads. The value of PUBLIC_URL for local is "" and for the server is "/subfolder". Because I have to put this project under a subfolder. Other links work fine but I only face the problem with dynamic pages.
Note: If I put the project in the root domain, all links work fine. I only face the issue with a subfolder.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Example Code:
<Link href={
/shop/product-basic/[slug]?slug=${product.slug}} as={
${process.env.PUBLIC_URL}/shop/product-basic/${product.slug}} >
I want to navigate to the dynamic page without reloading. The example above is the way I made the link. In the local environment, it works fine. But when I deploy to apache server the page reloads. The value of PUBLIC_URL for local is "" and for the server is "/subfolder". Because I have to put this project under a subfolder. Other links work fine but I only face the problem with dynamic pages.
Note: If I put the project in the root domain, all links work fine. I only face the issue with a subfolder.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions