Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Redirects to static content don't redirect #3421

Description

@marikaner

🐛 Bug Report

In our docs, we have API docs listed by version. I wanted to add a link that always points to the latest version of the API docs, aka: api/latest/ should redirect to api/1.28.1/ e. g.
The url is correctly replaced, but the redirect does not happen and I am left with a "Page not found" error. The status code is 200, while I would expect a 301. When reloading the page I am actually presented with the correct document.

Have you read the Contributing Guidelines on issues?

Yes.

To Reproduce

  1. Have a redirect to static content.

Expected behavior

Redirects to the linked page and status code 301.

Actual Behavior

Replaces link correctly, but has status code 200 and content is "Page not found".

Screenshot 2020-09-08 at 15 16 00

Your Environment

  • Docusaurus version used: 2.0.0-alpha.63
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Chrome 85.0.4183.83
  • Operating system and version (desktop or mobile): macOS 10.15.6

Reproducible Demo

Speaking in docs sources

This is the file that is supposed to induce the redirection:
https://github.com/SAP/cloud-sdk/blob/documentation/src/pages/api/latest.mdx

to e. g. this file https://github.com/SAP/cloud-sdk/blob/documentation/static/api/1.28.1/index.html

Speaking in links

https://sap.github.io/cloud-sdk/api/latest/ should redirect to https://sap.github.io/cloud-sdk/api/1.28.1/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed: questionThis issue is a user error/misunderstanding.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions