Tasty Travel redirector

Serve a single canonical link, pick the best language for the visitor, and hand off to the final destination with a 307 redirect.

How it works

  1. Visitors hit /r/<slug> (e.g. /r/mytool).
  2. The app inspects ?lang, cookies, referrer paths, then theAccept-Language header in that order.
  3. A target URL is resolved from the definitions inconfig/redirects/slugs.
  4. Requests are logged with headers, cookies, and resolution details to help debug language issues.

Configure destinations

Edit config/redirects/index.ts to manage supported languages and cookie behaviour, maintain affiliate parameters inconfig/affiliates.ts, then add files underconfig/redirects/slugs for each blog entry. Each slug file defines language-specific targets, and the system gracefully falls back to the global default language when needed.

Inspecting logs

Every redirect attempt is logged with the slug, the raw headers, cookies, and the full language resolution trace. Use your hosting provider's log viewer (e.g. Vercel Logs) to confirm which signals are present in requests from the WordPress site.