Files
supabase/apps/docs/lib
Jeremias Menichelli 885124771f chore: Restore hash on kb pages, reverse redirects to permanent paths (#52788)
## Problem

In our initial launch of `kb`, a script mistakenly removed the hash in
the end of troubleshooting guides. This pattern removal was wrong, since
it didn't delete several non-matching hashes, plus created discrepancies
between our troubleshooting database table.

## Solution

Because we launched already, we need to make sure people with the old
hash-less URLs can still access the content by manually listing these
mistakes in redirects at kb level. We will remove the pattern matching
from docs redirects and special redirects since they are not needed
anymore thanks to this.

From now on, URLs hashes will stay as the default URL behavior.

Adapting the project to hash-less URLs would be more complicated and
dangerous:
 - We would need to manually run migrations on database tables
- Update the HEX AI script generating these hashes to actually stop or
follow a stricter pattern
- We would still run onto a potential issue by the reg ex match failing
for certain pages

<!--
## Preview links

If relevant, include links to changed pages for easy review access.

Copy the preview base URL from the Vercel bot comment on this PR. Use
the following table as an example template.

| Site | Live | Preview | Search for |
| -------------- |
-------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------
| ----------------------------- |
| WWW | [/blog/your-post](https://supabase.com/blog/your-post) |
[/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post)
| unique phrase from the change |
| Docs |
[/docs/guides/your-page](https://supabase.com/docs/guides/your-page) |
[/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page)
| unique phrase from the change |
| Studio | [/dashboard](https://supabase.com/dashboard) |
[/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard)
| unique phrase from the change |
| Design system | [/design-system](https://supabase.com/design-system) |
[/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system)
| unique phrase from the change |
| UI library | [/library](https://supabase.com/library) |
[/library](https://ui-library-git-branch-name-supabase.vercel.app/library)
| unique phrase from the change |
| Knowledge base |
[/kb/guides/your-page](https://supabase.com/kb/guides/your-page) |
[/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page)
| unique phrase from the change |
-->

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## Review instructions

Test docs redirects working correctly:
- Go to
https://docs-git-jeremiasmenichelli-docs-1577-fix-redir-24a637-supabase.vercel.app/docs/guides/troubleshooting/42501--permission-denied-for-table-httprequestqueue-KnozmQ
it should lead to
https://docs-git-jeremiasmenichelli-docs-1577-fix-redir-24a637-supabase.vercel.app/kb/troubleshooting/42501--permission-denied-for-table-httprequestqueue-KnozmQ
 - This would lead to a 404 because each preview has different base URL.
 
_Sadly, cross-site redirects cannot be tested in preview environments._

You can test kb redirects:
- Go to a guide without its hash, for example
https://kb-git-jeremiasmenichelli-docs-1577-fix-redirec-963704-supabase.vercel.app/kb/troubleshooting/42501--permission-denied-for-table-httprequestqueue,
it should lead to
https://kb-git-jeremiasmenichelli-docs-1577-fix-redirec-963704-supabase.vercel.app/kb/troubleshooting/42501--permission-denied-for-table-httprequestqueue-KnozmQ

 
 

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-11-04 13:51:05 +01:00
..
2026-09-11 12:17:49 +08:00