Streaming live at 10am (PST)

404 when URL contains capitalized letters


#1

I'm getting an error 404 when a letter is capitalized in a URL to a dynamic page. If I go to http://lightthesky.webflow.io/cities/chicago, the URL works perfectly, but if I enter http://lightthesky.webflow.io/cities/Chicago, I get the 404 error. I know this can be corrected in htaccess, but what if the site is hosted by Webflow? Is there a workaround or fix for this?


#2

Hi @jordanshotwell, thanks for reporting this behavior.

At the moment the URLs are case sensitive, however I can see that the dev team is aware of the situation with those case sensitive URLs and are looking into solutions.

Webflow does not use .htaccess, so this will need to be a feature enhancement to the redirects functionality, perhaps a toggle or something that forces the url to an authoritative case automatically.

As soon as there is more info, and update here will be made.

I did a test and it is possible to setup a redirect from /cities/Chicago to /cities/chicago as a workaround for specific paths using our Redirects feature.

Thanks in advance!


#4

Thanks @cyberdave. However, redirects can only do so much since they're dynamic page templates. I would need to create a redirect for each new dynamic page.


#5

You don't have to. Paste this in the 404 page > Page Settings > Custom Code > Header Code:

<script>
if(location.href !== location.href.toLowerCase()) {
  location.href = location.href.toLowerCase();
}
</script>

Demo: http://404-uppercase-redirect.webflow.io


#6

Thanks @samliew :slight_smile: Very helpful workaround there. Thanks @jordanshotwell the item is still under discussion, for update :slight_smile:


#7

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.