Fix hreflang canonical + LangToggle: use centralized ES/EN slug map

- Add src/i18n/hreflang-map.ts with getHreflangUrl() for translated slugs
- Fix BaseLayout.astro hreflang tags (was hardcoding ES='/', 404 URLs)
- Fix LangToggle.astro to use hreflang map instead of naive path swap
- Fix htaccess.conf: remove !-f / !-d that blocked .html redirects
This commit is contained in:
Mauricio López Coria
2026-07-05 20:34:15 -03:00
parent ff3e57051f
commit b26959a041
4 changed files with 58 additions and 14 deletions
+1 -3
View File
@@ -12,9 +12,7 @@
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# Quitar .html de la URL (limpieza opcional)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Quitar .html de la URL — evita duplicados index.html vs /
RewriteCond %{REQUEST_URI} ^(.+)\.html$ [NC]
RewriteRule ^(.+)\.html$ /$1 [R=301,L]
</IfModule>