question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: on an 404 with master try to redirect to main

See original GitHub issue

When

  • a repo renames the default branch from master to main
  • GitHub has no default redirect 😦
  • i open a deep link to a file at the master branch

Expected

  • redirect to master
  • or a default button to main without requesting the default branch

Current

  • i see an 404
  • i see the path and strike for dirs which are deleted
  • but i don’t always see the try default branch button (maybe when it not possible to query for the default branch?)

Example Link

Link:

https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-reference-like-url

Screenshot

Bildschirmfoto 2020-07-01 um 13 59 56

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
notlmncommented, Jul 1, 2020

@yakov116 yup, looks like a cache issue.

@muescha can you try clearing your extension cache from inside the extension options page and trying this out again. Because as @yakov116 mentioned we do already show that link as you are expecting it.

2reactions
yakov116commented, Jul 1, 2020

Did not check it out. But maybe they have the default branch already in the cache. We do a 404 check before and on the cache default branch it does not exist.

Read more comments on GitHub >

github_iconTop Results From Across the Web

There is no way to properly redirect to 404 - not found page ...
Let's say there is a /post/:id route and user tries to load /post/non-existing-id . In this case I catch 404 http error in...
Read more >
node.js - How to redirect 404 errors to a page in ExpressJS?
Try to POST a random URL with the other method; it will return the default Cannot POST... . An attacker would then know...
Read more >
Redirect not working - WordPress.org
First link from the log went to the default 404 page and then it was correctly automatically redirected to the correct page. Second...
Read more >
How to Fix Error 404 Not Found on Your WordPress Site - Kinsta
The best way to fix this is to automatically redirect anyone who tries to access the old location to the new location. That...
Read more >
Avoid HTTP 404 (Not Found) Error in Shopify - Oscprofessionals
The 404 block means that a page was not found or the client sent a request with a certain problem. The issue is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found