127 — Relative URL in Chrome
- issue found in http://lekkyweb.com/blogs
- works well in FireFox.
- Chrome: http://lekkyweb.com/127-relative-url-ticket.html
- FF: http://lekkyweb.com/blogs/127-relative-url-ticket.html
- but works in Chrome if called with tailing slash : http://lekkyweb.com/blogs/
- Looks like Chrome it is at root level, not in /blogs.
- index.html is automatically added by linodeobjects. (AWS/S3)
The FIX : a rewrite in Nginx.
location / {
proxy_http_version 1.1;
rewrite ^([^.]*[^/])$ $1/ permanent;
proxy_set_header Host website-us-east-1.linodeobjects.com;
proxy_pass https://website-us-east-1.linodeobjects.com/lekky2.0/;
}
References:
https://www.onlineassetpartners.co.nz/blog/how-trailing-slashes-affect-your-websites-seo/
https://developers.google.com/search/blog/2010/04/to-slash-or-not-to-slash
https://css-tricks.com/trailing-slashes-on-urls-contentious-or-settled/
https://serverfault.com/users/99559/vincent-io