#!/usr/bin/env python3 """ Fix canonical URLs on redirect pages. """ import os # Files that need canonical fixes (path -> correct canonical) CANONICAL_FIXES = { "about/index.html": "https://landvex.com/about/", "blog/index.html": "https://landvex.com/blog/", "comparison/index.html": "https://landvex.com/comparison/", "enterprise/index.html": "https://landvex.com/enterprise/", "pilot/index.html": "https://landvex.com/pilot/", } def fix_canonical(filepath, correct_canonical): with open(filepath, 'r', encoding='utf-8') as f: content = f.read() # Find and replace canonical href original = content content = content.replace( f'\n