# Cloudflare Pages / Netlify redirects
# https://developers.cloudflare.com/pages/platform/redirects

# Baidu verification file - prevent automatic .html stripping
/baidu_verify_codeva-L08oitvCVO  /baidu_verify_codeva-L08oitvCVO.html  200

# Redirect old tool path to new
/tool/*  /tools/:splat  301

# Moved tools (2026-04 cleanup: align directory with category)
# 同时覆盖 .html 与 cleanURL（无后缀）两种形式，否则裸 URL 会 fallback 到首页
/tools/ecommerce/discount-calculator.html  /tools/shopping/discount-calculator.html  301
/tools/ecommerce/discount-calculator       /tools/shopping/discount-calculator       301
/tools/lifestyle/habit-tracker.html        /tools/life/habit-tracker-checkin.html    301
/tools/lifestyle/habit-tracker             /tools/life/habit-tracker-checkin         301
/tools/pet/pet-age-calculator.html         /tools/pets/pet-age-calculator-cn.html    301
/tools/pet/pet-age-calculator              /tools/pets/pet-age-calculator-cn         301
/tools/gaming/dice-roller.html             /tools/game/dice-roller.html              301
/tools/gaming/dice-roller                  /tools/game/dice-roller                   301
/tools/real-estate/rent-vs-buy.html        /tools/realestate/rent-vs-buy-cn.html     301
/tools/real-estate/rent-vs-buy             /tools/realestate/rent-vs-buy-cn          301

# Deduplicated tools (2026-05): merge cross-category duplicates
/tools/converter/morse-code.html           /tools/text/morse-code.html               301
/tools/converter/morse-code                /tools/text/morse-code                    301
/tools/business/depreciation.html          /tools/finance/depreciation.html          301
/tools/business/depreciation               /tools/finance/depreciation               301
/tools/security/robots-generator.html      /tools/seo/robots-generator.html          301
/tools/security/robots-generator           /tools/seo/robots-generator               301

# Note: Do NOT add a catch-all 404 redirect here
# It will break static files like sitemap.xml and robots.txt
# Cloudflare Pages handles 404s automatically
