# Expocolchón Valencia - sitio estático
Options -Indexes
DirectoryIndex index.html
AddDefaultCharset UTF-8

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

# Páginas antiguas retiradas -> 301
RewriteRule ^contacto/?$ /index.html#contacto [R=301,L,NE]
RewriteRule ^marcas/?$ /index.html [R=301,L]
RewriteRule ^bedline(/.*)?$ /categoria/canapes.html [R=301,L]
RewriteRule ^(mas-vendidos|novedades|productos-rebajados)/?$ /index.html [R=301,L]
RewriteRule ^mapa.*$ /index.html [R=301,L]
RewriteRule ^(stationery|home-accessories)/?$ /index.html [R=301,L]

# Blog antiguo (/informacion/* y /blog/*) -> nuevo blog
RewriteRule ^informacion/colchones/como-elegir-un-colchon/?$ /blog/como-elegir-un-colchon.html [R=301,L]
RewriteRule ^informacion/colchones/consejo-para-prolongar-la-vida-util-de-tu-colchon/?$ /blog/consejo-para-prolongar-la-vida-util-de-tu-colchon.html [R=301,L]
RewriteRule ^informacion/dorelan/tecnologia-myform-dorelan/?$ /blog/tecnologia-myform-dorelan.html [R=301,L]
RewriteRule ^informacion(/.*)?$ /blog.html [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^blog($|/.+) /blog.html [R=301,L]

# URLs antiguas de producto/categoría -> nuevas .html (301, conserva el posicionamiento)
RewriteCond %{DOCUMENT_ROOT}/producto/$1.html -f
RewriteRule ^([a-z0-9-]+)/?$ /producto/$1.html [R=301,L]
RewriteCond %{DOCUMENT_ROOT}/categoria/$1.html -f
RewriteRule ^([a-z0-9-]+)/?$ /categoria/$1.html [R=301,L]

# Productos / subcategorías retirados -> su categoría
RewriteRule ^colchon[a-z0-9-]*/?$ /categoria/colchones-valencia.html [R=301,L]
RewriteRule ^canape[a-z0-9-]*/?$ /categoria/canapes.html [R=301,L]
RewriteRule ^almohada[a-z0-9-]*/?$ /categoria/almohadas.html [R=301,L]
RewriteRule ^somier[a-z0-9-]*/?$ /categoria/somieres.html [R=301,L]
RewriteRule ^protector[a-z0-9-]*/?$ /categoria/protectores.html [R=301,L]
RewriteRule ^cabecero[a-z0-9-]*/?$ /categoria/cabeceros.html [R=301,L]
RewriteRule ^tapibase[a-z0-9-]*/?$ /categoria/tapibases.html [R=301,L]
</IfModule>

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/webp "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
</IfModule>
