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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user