preact-router icon indicating copy to clipboard operation
preact-router copied to clipboard

activeClassName case sensitive?

Open CedarDCX opened this issue 7 years ago • 2 comments

I'm currently having an issue with the activeClassName prop on <Link />.

It doesn't seem to activate if the URL has a different case to the <Link /> href value.

For example, if the current URL is: www.urlname.com/MyPageName

But the href value in the <Link /> is: /mypagename

The active class does not get applied. Is there any way to get around this? Is there some configuration I am missing?

Thank you

CedarDCX avatar Nov 03 '17 11:11 CedarDCX

Ah, good catch. I think right now preact-router is entirely case-sensitive, but the browser is not.

developit avatar Nov 03 '17 16:11 developit

This is old, but case sensitive paths of urls should be the right behavior. /XYZ is a complete different url than /xyz. They can exist the same time and deliver complete different content. This is only on windows webservers not the case if they deliver files, because the windows file system is case insensitive by default. But professional server operating systems are case sensitive.

Btw. web applications should never deliver content case insensitive and promote different urls for the same content. This is duplicate content.

hbroer avatar Apr 24 '19 08:04 hbroer