-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Bug Report — Runtime APIs html_handling = 'none' in a Workers with Assets doesn't find the index.html file inside a folder #7422
Comments
Hi, thanks for the report! I wasn't able to reproduce this bit:
In my testing, Pages would redirect The |
Hi @GregBrimble Can I create a feature-request in this repository? To have a new option value to have the same behaviour as a normal web server (nginx, apache...) and prevent many 307/308 redirections that are not good for SEO? |
Please do! I understand the desire to reduce redirects. Generally though, for SEO, duplicate content is worse, so that's why we only serve content from a single canonical URL and redirect all others to that location. If you can describe the behavior you want in another issue tagged as a feature request, we'll consider adding that as a config option. In this case, I'm still a bit confused — it's not often that I've seen people wanting to flatten Additionally, we plan to add more features to Workers Assets which will allow you to run your Worker script in front of any assets, and there you could implement your own custom routing. Expect that to be available soon-ish. |
Thank you @GregBrimble ! |
We trying to move Pages to a « Static Assets » (Worker with Static Assets but without any Worker), because this seems that Pages will disappear at some point in the future and be replaced with this new product.
But both product doesn't have the same behaviour for routing:
Imagine this structure:
/file.html
/folder/index.html
Pages:
« domain.tld/file.html » => status 200 and return /file.html
« domain.tld/folder/ » => status 200 and return /folder/index.html
Static Assets with html_handling = 'auto-trailing-slash' :
« domain.tld/file.html » => 307 to « /file » and the 2nd request return /file.html with status 200
« domain.tld/folder/ » => 200 and return /folder/index.html
Static Assets with html_handling = 'force-trailing-slash' :
« domain.tld/file.html » => 307 to « /file/ » and the 2nd request return /file.html with status 200
« domain.tld/folder/ » => 200 and return /folder/index.html
Static Assets with html_handling = 'drop-trailing-slash' :
« domain.tld/file.html » => 307 to « /file » and the 2nd request return /file.html with status 200
« domain.tld/folder/ » => 307 to « /folder » and the 2nd request return /folder/index.html with status 200
Static Assets with html_handling = 'none' :
« domain.tld/file.html » => 200 and return /file.html
« domain.tld/folder/ » => 404
May be it's a bug of the « none » option, that on a « /folder/ » with a trailing slash should return 200 with the index.html inside if exists or 404 only if not found.
Or may be it's the behaviour really expected, but in this case, it's missing an option « standard » to act like any standard website and like Pages.
Currently, it's not possible to convert our Pages projects to Workers with Assets because of all theses 307 redirections that have an impact on SEO.
The text was updated successfully, but these errors were encountered: