# Blog Slug Redirects (Year-Specific → Evergreen)

**Last Updated:** 2026-03-16

Evergreen blog posts use category-agnostic slugs (e.g. `gastronomie-mindestlohn`) instead of year-prefixed slugs (e.g. `2025-gastronomie-mindestlohn`). Old year-specific URLs redirect 301 to the evergreen canonical.

## Rationale

- **Single canonical URL** – Content is updated annually; one URL avoids duplicate listings in indexes
- **SEO consolidation** – Link equity and rankings consolidate to one URL
- **Maintainability** – No annual slug migrations; update content in place

## Current Redirects

| Old slug | Canonical slug | Category |
|----------|----------------|----------|
| 2025-gastronomie-mindestlohn | gastronomie-mindestlohn | ratgeber |

## Implementation

### .htaccess (Apache/Docker)

```
RewriteRule ^insights/ratgeber/2025-gastronomie-mindestlohn/?$ /insights/ratgeber/gastronomie-mindestlohn/ [R=301,L,QSA]
```

### router.php (PHP built-in server)

Router replicates the redirect before blog post routing. See inline `$blog_slug_redirects` in `router.php`.

### Internal Links

Use canonical URL in all internal links: `/insights/ratgeber/gastronomie-mindestlohn/`

## Adding a New Redirect

When migrating a year-specific slug to evergreen:

1. Rename post file: `202X-topic.json` → `topic.json`
2. Update slug and url in post JSON
3. Add .htaccess rule (with QSA for UTM/partner params)
4. Add to `$blog_slug_redirects` in router.php
5. Run `fix-permanent-redirects.py` or update internal links in related posts
6. Remove old file from `posts/` and `posts_cleaned/`
7. Update `docs/data/blog-posts-content.json` if present

## Related

- `docs/development/CANONICAL_URLS_AND_LINKING.md` – Use canonical URLs in links
- `v2/scripts/blog/fix-permanent-redirects.py` – Update internal links after slug migration
