I am using Next JS 12.2.0. I have the Link tag as below,
<Link href={`/blog/${post.slug}/`}>
<a>{post.title}</a>
</Link>
The problem is some of the hrefs have the trailing slash but some of them don't. Can anyone tell me why this is happening? Thanks in advance.
This is the href that has this problem. I have also tried to put it like this to test. Still, Link tag removes the trailing slash.
href="/blog/vps-virtual-server-hosting-intel-xeon-gold-high-frequency-cpus-3.5ghz/"
I tried to write the dynamic href string in different string construction ways. But always having this issue.
Finally, I have found the reason.
Only when there is a '.' in the URL, this is happening. If I replace that '.' with something like '_', then this problem is gone.
I am not sure, why this is happening, but for the moment, I have decided to replace the '.'s from the URLs. Thanks.