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
Some hosting services (Cloudflare Pages in particular) seem to have a problem with HTML files containing dots other than the file extension in the file name.
CF apparently treats any URL containing a dot as a specific file. This collides with their URL rewriting, which causes URLs ending in .html to be redirected to their extensionless version. Normally this works, but if theres a dot still remaining in the URL, CF will proceed to 404, since it can't find that file.
The request /classes/mymodule.MyClass.html
is redirected to /classes/mymodule.MyClass
which 404s since the file mymodule.MyClass does not exist.
Suggested Solution
While this is quite obviously a misconfiguration on CFs part, being able to specify a separator manually would mitigate this.
Afaik, this isn't trivially solvable with a plugin, since getUrl on the default theme is a static method. Please correct me if I'm wrong.
Maybe I'm missing a really obvious way to work around this – your help would be much appreciated!
The text was updated successfully, but these errors were encountered:
Wow, yeah that's annoying... this could be done by a plugin today by providing a custom theme that just overrode the buildUrls method, but that's still not ideal. I've wanted to refactor that part of the code to delegate to a separate router that could be configured independently from the theme for a while. This might be the necessary push for it to actually happen...
Search Terms
URL, link, file name, separator, dot
Problem
Some hosting services (Cloudflare Pages in particular) seem to have a problem with HTML files containing dots other than the file extension in the file name.
CF apparently treats any URL containing a dot as a specific file. This collides with their URL rewriting, which causes URLs ending in
.html
to be redirected to their extensionless version. Normally this works, but if theres a dot still remaining in the URL, CF will proceed to 404, since it can't find that file.The request
/classes/mymodule.MyClass.html
is redirected to
/classes/mymodule.MyClass
which 404s since the file
mymodule.MyClass
does not exist.Suggested Solution
While this is quite obviously a misconfiguration on CFs part, being able to specify a separator manually would mitigate this.
Afaik, this isn't trivially solvable with a plugin, since
getUrl
on the default theme is a static method. Please correct me if I'm wrong.Maybe I'm missing a really obvious way to work around this – your help would be much appreciated!
The text was updated successfully, but these errors were encountered: