Did redirects break/change?

Hi, I set up a Netlify site awhile ago so facilitate deploying independent pieces of the overall site under previews. There’s a top-level “prod” deployment which contains an index.html and redirects to underlying previews, which users can individually change. This has worked well for awhile, but we just encountered an issue where links no longer seem to be properly redirected; they lack the redirect prefix in the top-level HTML.

For example:
Introduction — California Transit Speed Maps this site lives under /rt/ direct. Its links lack that prefix, e.g. https://analysis.calitp.org/district_01-eureka should be District 01 - Eureka — California Transit Speed Maps in the HTML

At the moment, it looks like it has been resolved. Has something changed?

I worked around it on that specific site by temporarily adding the files directly. This site shows the problem still: Introduction — DLA Grant Analysis e.g. it links to https://analysis.calitp.org/district_4__district_title_district-4-oakland/0__dla_district_report__district_4__district_title_district-4-oakland but it should link to District 4 - Oakland — DLA Grant Analysis

There has only been a single deploy of that page and it has always been broken (in the HTML uploaded and not by anything Netlify did).

It looks like an absolute vs relative path references in the<a> tags in the HTML is the root cause here.

The starting URL is this (and, please note. that is proxying to the branch subdomain version of the site) :


The path portion of the URL is this:


Using terminology for filesystems, the file README.html above resides in the subdirectory dla.

The <a> tag in the HTML file README.html is this:

<a class='reference internal' href='/district_4__district_title_district-4-oakland/0__dla_district_report__district_4__district_title_district-4-oakland'>

That path in the href attribute is this:


As that is an absolute path, it will remove the subdirectory dla. The finalized path in the browser for the <a> tag above would be this:


The path in the href can also be expressed as a relative path like so:


If that is done, the path above is appended to the current directory and the path in the link URL becomes this:


You want the dla to remain in the path so the href must use a relative path reference (and it does not).

Nothing at Netlify has changed regarding this. You’ve only made a single deploy of that branch successfully (deploy 647e728d19913538ae08f3b5) and it has alway had this problem.

Again, the problem is in the HTML in that it is designed using absolute URLs which then break when you proxy to them under a subdirectory. The solution is to make those URLs relative to the current directory in the path.

If there are other questions about this, please let us know.