# ============================================================
# ADVANCEIN ORGANICS LLP — .htaccess v11
# Covers all Google Search Console 404s + short-form URLs
# v4 (2026-06-12): catchalls now verify target file exists (no more
#   301-to-404 chains); unknown old slugs go to /products.html;
#   added /product/calcium-acetate-manufacturer-in-india rule
# v5 (2026-06-12): sodium-acid-pyrophosphate-2 merged into canonical page
# v6 (2026-06-13): fixed 10 internal 301→404 chains (wrong target slugs);
#   blog posts now 301 to nearest product (not products.html);
#   coverage verified against full GSC 404 drilldown export
# v7 (2026-07-10): 8 unredirected legacy duplicate files in /products/
#   now 301'd (7 to canonical pages, carboxymethyl-cellulose-cmc to
#   homepage per owner decision); buy-sodium-acetate-anhydrous kept
#   live and added to catalog; 44 legacy files deleted from server
# v11 (2026-10-27): clean-address internal rewrite for Hostinger failover
#   (canonical tags now use /page, not /page.html)
# Total rules: 218+ | Updated: 2026-10-27
# ============================================================

Options -Indexes
ErrorDocument 404 /404.html

RewriteEngine On


# ── Force HTTPS ─────────────────────────────────────────────
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


# ── Clean addresses (v11, 2026-10-27) ────────────────────────
# Canonical tags now use the clean address (/about, /products/x),
# same as sitemap.xml and Cloudflare Pages. If the site ever fails
# over to Hostinger, serve /x from x.html silently (no redirect).
# Internal rewrite only: tools/build-redirects.py skips it.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)$ $1.html [L]


# ── Mobile Device Routing ────────────────────────────────────
# v8 (2026-08-25): device split retired. index.html is now a single
# responsive homepage serving both mobile and desktop. The old
# desktop-only homepage 301s to root so its links and any indexed
# copies consolidate onto "/".
RewriteRule ^desktop\.html$ / [L,R=301]

# ── v10 (2026-10-07): duplicate product pages merged ──────
# One chemical, one page. The removed page 301s to the page we keep.
RewriteRule ^products/disodium\-diphosphate\-manufacturer\.html$ /products/sodium-acid-pyrophosphate.html [L,R=301]
RewriteRule ^products/gluconolactone\-manufacturer\.html$ /products/glucono-delta-lactone-manufacturer.html [L,R=301]
RewriteRule ^products/potassium\-dihydrogen\-orthophosphate\-manufacturer\.html$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]

RewriteRule ^product/disodium-diphosphate-manufacturer/?$ /products/sodium-acid-pyrophosphate.html [L,R=301]
RewriteRule ^products/disodium-diphosphate-manufacturer/?$ /products/sodium-acid-pyrophosphate.html [L,R=301]
RewriteRule ^product/gluconolactone-manufacturer/?$ /products/glucono-delta-lactone-manufacturer.html [L,R=301]
RewriteRule ^products/gluconolactone-manufacturer/?$ /products/glucono-delta-lactone-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-dihydrogen-orthophosphate-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/potassium-dihydrogen-orthophosphate-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
# ── v9 (2026-08-25): homepage product-link cleanup ──────────
# The homepage PRODUCTS list used "-manufacturer" slugs that don't match
# the real filenames. Slugs corrected in index.html; these 301s catch any
# already-indexed or externally-linked "-manufacturer" URLs.
RewriteRule ^products/calcium-disodium-edta-manufacturer\.html$ /products/calcium-disodium-edta.html [L,R=301]
RewriteRule ^products/calcium-gluconate-manufacturer\.html$ /products/calcium-gluconate.html [L,R=301]
RewriteRule ^products/magnesium-glycinate-manufacturer\.html$ /products/magnesium-glycinate.html [L,R=301]
RewriteRule ^products/ferrous-glycinate-manufacturer\.html$ /products/ferrous-glycinate.html [L,R=301]
RewriteRule ^products/ferrous-fumarate-manufacturer\.html$ /products/ferrous-fumarate.html [L,R=301]
RewriteRule ^products/ferric-ammonium-citrate-manufacturer\.html$ /products/ferric-ammonium-citrate.html [L,R=301]
RewriteRule ^products/zinc-glycinate-manufacturer\.html$ /products/zinc-glycinate.html [L,R=301]
RewriteRule ^products/zinc-disodium-edta-manufacturer\.html$ /products/zinc-disodium-edta.html [L,R=301]
# v10 (2026-08-29): STPP and Guar Gum now have real product pages;
# temporary sibling redirects removed.


# ── Block WP login/admin (security) ─────────────────────────
# Credentials were exposed in Google crawl — block all WP paths
RewriteRule ^wp-login\.php.* /404.html [L,R=301]
RewriteRule ^wp-admin/.* /404.html [L,R=301]
RewriteRule ^wp-includes/.* /404.html [L,R=301]
RewriteRule ^wp-content/.* /404.html [L,R=301]
RewriteRule ^wp-.+\.php.* /404.html [L,R=301]

# ── Remove trailing slashes (except root) ───────────────────
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# ── SECTION 1: Root-level old URLs (from Google 404 report) ─
RewriteRule ^aboutus/?$ /about.html [L,R=301]
RewriteRule ^ascorbic-acid-food-grade-manufacturer-in-india/?$ /products/ascorbic-acid-manufacturer.html [L,R=301]
RewriteRule ^ascorbic-acid-food-grade/?$ /products/ascorbic-acid-manufacturer.html [L,R=301]
RewriteRule ^calcium-acetate-e263/?$ /products/calcium-acetate-e263-manufacturer.html [L,R=301]
RewriteRule ^calcium-acetate-manufacturer-in-india/?$ /products/calcium-acetate-e263-manufacturer.html [L,R=301]
RewriteRule ^calcium-propionate-price-e282-manufacturer-supplier-india/?$ /products/calcium-propionate-manufacturer.html [L,R=301]
RewriteRule ^exploring-the-benefits-and-applications-of-sodium-aluminium-phosphate/?$ /products/sodium-aluminium-phosphate.html [L,R=301]
RewriteRule ^ferric-pyrophosphate-iron-iii-manufacturer/?$ /products/ferric-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^ferric-pyrophosphate-manufacturer-in-india/?$ /products/ferric-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^ferric-pyrophosphate/?$ /products/ferric-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^neotame-powder/?$ /products/neotame-sweetener-powder.html [L,R=301]
RewriteRule ^neotame-sweetener-powder/?$ /products/neotame-sweetener-powder.html [L,R=301]
RewriteRule ^potassium-sorbate-comparison-with-sorbic-acid/?$ /products/potassium-sorbate-manufacturer.html [L,R=301]
RewriteRule ^potassium-sorbate/?$ /products/potassium-sorbate-manufacturer.html [L,R=301]
RewriteRule ^sodium-acetate-anhydrous/?$ /products/buy-sodium-acetate-anhydrous.html [L,R=301]
RewriteRule ^sodium-aluminium-phosphate/?$ /products/sodium-aluminium-phosphate.html [L,R=301]
RewriteRule ^sodium-ascorbate/?$ /products/ascorbic-acid-manufacturer.html [L,R=301]
RewriteRule ^sucralose-india/?$ /products/sucralose-e955-sweetener-manufacturer.html [L,R=301]
RewriteRule ^top-10-food-ingredients-suppliers/?$ /products.html [L,R=301]
RewriteRule ^what-is-saccharin-made-of/?$ /products/sucralose-e955-sweetener-manufacturer.html [L,R=301]
RewriteRule ^what-is-sodium-saccharin-made-of/?$ /products/sucralose-e955-sweetener-manufacturer.html [L,R=301]
RewriteRule ^what-is-sucralose-made-of/?$ /products/sucralose-e955-sweetener-manufacturer.html [L,R=301]
RewriteRule ^zinc-citrate/?$ /products/zinc-citrate-manufacturer.html [L,R=301]

# ── SECTION 2: Old /product/ WooCommerce URLs ───────────────
RewriteRule ^product/acesulfame-k/?$ /products/acesulfame-potassium-k-manufacturer.html [L,R=301]
RewriteRule ^product/acesulfame-potassium-k-manufacturer-india/?$ /products/acesulfame-potassium-k-manufacturer.html [L,R=301]
RewriteRule ^product/ammonium-oxalate-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/ammonium-oxalate/?$ /products.html [L,R=301]
RewriteRule ^product/ascorbic-acid-food-grade/?$ /products/ascorbic-acid-manufacturer.html [L,R=301]
RewriteRule ^product/ascorbic-acid-food-grade-manufacturer-in-india-vitamin-c-supplier/?$ /products/ascorbic-acid-manufacturer.html [L,R=301]
RewriteRule ^product/ascorbic-acid-food-grade-manufacturer-in-india/?$ /products/ascorbic-acid-manufacturer.html [L,R=301]
RewriteRule ^product/caffeine-anhydrous-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/calcium-acetate-manufacturer/?$ /products/calcium-acetate-e263-manufacturer.html [L,R=301]
RewriteRule ^product/calcium-acetate-manufacturer-in-india/?$ /products/calcium-acetate-e263-manufacturer.html [L,R=301]
RewriteRule ^product/calcium-oxalate-dihydrate-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/choline-chloride-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/chromic-acetate-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/citric-acid-beverage-grade-manufacturer/?$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^product/citric-acid-buffer-system-manufacturer/?$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^product/citric-acid-chelating-agent-manufacturer/?$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^product/citric-acid-cleaning-grade-manufacturer/?$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^product/citric-acid-food-grade-manufacturer/?$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^product/citric-acid-glass-grade-manufacturer/?$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^product/citric-acid-manufacturer/?$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^product/citric-acid-monohydrate-manufacturer/?$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^product/citric-acid-pH-adjustment/?$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^product/citric-acid-pharma-grade-manufacturer/?$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^product/collagen-peptides-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/copper-acetate-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/creatine-hcl-manufacturer/?$ /products/creatine-monohydrate-manufacturer.html [L,R=301]
RewriteRule ^product/electrolyte-blends-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/erythritol-manufacturer/?$ /products/erythritol-manufacturer.html [L,R=301]
RewriteRule ^product/ferric-pyrophosphate-manufacturer-in-india/?$ /products/ferric-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^product/ferrous-ascorbate-manufacturer/?$ /products/ferrous-ascorbate.html [L,R=301]
RewriteRule ^product/food-grade-l-tartaric-acid/?$ /products/l-tartaric-acid-manufacturer.html [L,R=301]
RewriteRule ^product/fructo-oligo-saccharide-liq-95/?$ /products/fructo-oligo-saccharide-manufacturer.html [L,R=301]
RewriteRule ^product/fructo-oligo-saccharide-liquid-55/?$ /products/fructo-oligo-saccharide-manufacturer.html [L,R=301]
RewriteRule ^product/gluconolactone-gdl-e575-glucono-delta-lactone/?$ /products/glucono-delta-lactone-manufacturer.html [L,R=301]
RewriteRule ^product/lactic-acid-manufacturer/?$ /products/lactic-acid-88-manufacturer.html [L,R=301]
RewriteRule ^product/lactose-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/lecithin-manufacturer/?$ /products/lecithin-manufacturer.html [L,R=301]
RewriteRule ^product/magnesium-acetate-manufacturer/?$ /products/magnesium-acetate-manufacturer.html [L,R=301]
RewriteRule ^product/magnesium-lactate-manufacturer/?$ /products/magnesium-lactate-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^product/magnesium-oxide-manufacturer/?$ /products/magnesium-oxide-manufacturer.html [L,R=301]
RewriteRule ^product/malic-acid-manufacturer/?$ /products/malic-acid-manufacturer.html [L,R=301]
RewriteRule ^product/mixed-acid-blends-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/olive-oil-extract-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/omega-3-oil-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/oxalic-acid-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/potassium-acetate-anhydrous/?$ /products/potassium-acetate-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-oxalate-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/potassium-phosphate-monobasic-anhydrous-bp-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-phosphate-monobasic-anhydrous-ep-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-phosphate-monobasic-anhydrous-fcc-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-phosphate-monobasic-anhydrous-jdmf-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-phosphate-monobasic-anhydrous-kdmf-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-phosphate-monobasic-anhydrous-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-phosphate-monobasic-anhydrous-usp-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-phosphate-monobasic-anhydrous-usp-nf-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-phosphate-monobasic-bp-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-phosphate-monobasic-ep-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-phosphate-monobasic-kdmf-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/potassium-phosphate-monobasic-usp-manufacturer/?$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/protein-powder-manufacturer/?$ /products/soya-protein-isolate-manufacturer.html [L,R=301]
RewriteRule ^product/sodium-ascorbate-food-grade/?$ /products/ascorbic-acid-manufacturer.html [L,R=301]
RewriteRule ^product/sodium-carbonate/?$ /products.html [L,R=301]
RewriteRule ^product/sodium-chloride-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/sodium-diacetate-food-grade/?$ /products/sodium-diacetate-manufacturer.html [L,R=301]
RewriteRule ^product/sodium-phosphate-mix-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/sodium-phosphate-monobasic-decahydrate-manufacturer/?$ /products/sodium-phosphate-monobasic-monohydrate-manufacturer.html [L,R=301]
RewriteRule ^product/sodium-sulfate/?$ /products.html [L,R=301]
RewriteRule ^product/sorbic-acid-food-grade/?$ /products/sorbic-acid-manufacturer.html [L,R=301]
RewriteRule ^product/sorbic-acid-food-grade-manufacturer-in-india/?$ /products/sorbic-acid-manufacturer.html [L,R=301]
RewriteRule ^product/stevia-reb-a-manufacturer/?$ /products/stevia-sweetener-97-manufacturer.html [L,R=301]
RewriteRule ^product/sucralose-manufacturer-in-india/?$ /products/sucralose-e955-sweetener-manufacturer.html [L,R=301]
RewriteRule ^product/sucralose-manufacturer/?$ /products/sucralose-e955-sweetener-manufacturer.html [L,R=301]
RewriteRule ^product/tartaric-acid-manufacturer/?$ /products/l-tartaric-acid-manufacturer.html [L,R=301]
RewriteRule ^product/tetra-sodium-pyrophosphate-food-pharma-technical-pure/?$ /products/tetra-sodium-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^product/tri-calcium-phosphate-anhydrous-manufacturer/?$ /products/tri-calcium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^product/vitamin-d3-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/zinc-acetate-pharma-grade/?$ /products/zinc-acetate-manufacturer.html [L,R=301]
RewriteRule ^product/zinc-oxalate-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/zinc-oxide-manufacturer/?$ /products.html [L,R=301]
RewriteRule ^product/zinc-sulfate/?$ /products.html [L,R=301]

# ── SECTION 3: Old /products/ URL variants ──────────────────
RewriteRule ^products/ammonium-acetate-manufacturer-india/?$ /products/ammonium-acetate-manufacturer.html [L,R=301]
RewriteRule ^products/fructo-oligo-saccharide-liq-95/?$ /products/fructo-oligo-saccharide-manufacturer.html [L,R=301]
RewriteRule ^products/glycerol-monostearate-gms/?$ /products/glycerol-monostearate-manufacturer.html [L,R=301]
RewriteRule ^products/guar-gum/?$ /products/guar-gum-manufacturer.html [L,R=301]
RewriteRule ^products/magnesium-lactate-anhydrous/Machinery/?$ /products/magnesium-lactate-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^products/magnesium-sulphate-2/?$ /products/magnesium-sulphate-manufacturer.html [L,R=301]
RewriteRule ^products/potassium-acetate-anhydrous/?$ /products/potassium-acetate-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-dihydrogen-phosphate-manufacturer/?$ /products/sodium-dihydrogen-orthophosphate-manufacturer.html [L,R=301]
RewriteRule ^products/zinc-acetate-pharma-grade/?$ /products/zinc-acetate-manufacturer.html [L,R=301]

# ── SECTION 4: /advance-organic/ subfolder ──────────────────
RewriteRule ^advance-organic/neotame-sweetener-powder/?$ /products/neotame-sweetener-powder.html [L,R=301]
RewriteRule ^advance-organic/products/guar-gum/?$ /products/guar-gum-manufacturer.html [L,R=301]
RewriteRule ^advance-organic/products/zinc-acetate-pharma-grade/?$ /products/zinc-acetate-manufacturer.html [L,R=301]

# ── SECTION 5: Category/landing pages ───────────────────────
RewriteRule ^diammonium-phosphate-supplier/?$ /products.html [L,R=301]
RewriteRule ^specialty-chemical-supplier-in-india/?$ /products.html [L,R=301]
RewriteRule ^your-trusted-industrial-chemical-supplier-for-reliable-growth/?$ /products.html [L,R=301]
RewriteRule ^nutraceutical-raw-material-suppliers-in-india/?$ /products.html [L,R=301]
RewriteRule ^natural-sweeteners-supplier/?$ /products.html [L,R=301]
RewriteRule ^amino-acid-supplier/?$ /products.html [L,R=301]
RewriteRule ^health-supplement-ingredients/?$ /products.html [L,R=301]
RewriteRule ^food-thickener-supplier/?$ /products.html [L,R=301]
RewriteRule ^pharma-excipients-supplier/?$ /products.html [L,R=301]
RewriteRule ^nutrition-raw-materials/?$ /products.html [L,R=301]
RewriteRule ^sports-nutrition-ingredients/?$ /products.html [L,R=301]
RewriteRule ^food-gum-supplier/?$ /products.html [L,R=301]

# ── SECTION 6: Old WP system pages ──────────────────────────
RewriteRule ^about-us/?$ /about.html [L,R=301]
RewriteRule ^aboutus/?$ /about.html [L,R=301]
RewriteRule ^contact-us/?$ /contact.html [L,R=301]
RewriteRule ^company-certificates/?$ /certifications.html [L,R=301]
RewriteRule ^services/?$ /about.html [L,R=301]
RewriteRule ^shop/?$ /products.html [L,R=301]
RewriteRule ^cart/?$ /contact.html [L,R=301]
RewriteRule ^checkout/?$ /contact.html [L,R=301]
RewriteRule ^my-account/?$ /contact.html [L,R=301]

# ── SECTION 7: Blog posts ────────────────────────────────────
RewriteRule ^blogs/tetra-sodium-pyrophosphate/?$ /products/tetra-sodium-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^blogs/tetra-sodium-pyrophosphate-the-versatile-chemical-for-every-industry/?$ /products/tetra-sodium-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^blogs/creatine-monohydrate/?$ /products/creatine-monohydrate-manufacturer.html [L,R=301]
RewriteRule ^blogs/ferric-pyrophosphate/?$ /products/ferric-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^blogs/ferric-pyrophosphate-a-gentle-and-effective-iron-source-for-better-health/?$ /products/ferric-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^blogs/fructose-a-simple-sugar-with-a-complex-story/?$ /products/fructose-manufacturer.html [L,R=301]
RewriteRule ^blogs/food-grade-chemicals/?$ /products.html [L,R=301]
RewriteRule ^blogs/functional-food-ingredients/?$ /products.html [L,R=301]

# ── SECTION 8: Short-form /products/ URL redirects (89) ─────
# Missing -manufacturer suffix + common aliases
RewriteRule ^products/acesulfame-potassium-k\.html$ /products/acesulfame-potassium-k-manufacturer.html [L,R=301]
RewriteRule ^products/ammonium-acetate\.html$ /products/ammonium-acetate-manufacturer.html [L,R=301]
RewriteRule ^products/ammonium-chloride\.html$ /products/ammonium-chloride-manufacturer.html [L,R=301]
RewriteRule ^products/ammonium-polyphosphate\.html$ /products/ammonium-polyphosphate-manufacturer.html [L,R=301]
RewriteRule ^products/ascorbic-acid\.html$ /products/ascorbic-acid-manufacturer.html [L,R=301]
RewriteRule ^products/aspartame\.html$ /products/aspartame-manufacturer.html [L,R=301]
RewriteRule ^products/beta-alanine\.html$ /products/beta-alanine-manufacturer.html [L,R=301]
RewriteRule ^products/buy-sodium-hexametaphosphate\.html$ /products/sodium-hexa-meta-phosphate-shmp-manufacturer.html [L,R=301]
RewriteRule ^products/calcium-acetate-e263\.html$ /products/calcium-acetate-e263-manufacturer.html [L,R=301]
RewriteRule ^products/calcium-citrate\.html$ /products/calcium-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/calcium-citrate-malate\.html$ /products/calcium-citrate-malate-manufacturer.html [L,R=301]
RewriteRule ^products/calcium-lactate\.html$ /products/calcium-lactate-manufacturer.html [L,R=301]
RewriteRule ^products/calcium-oxalate\.html$ /products/calcium-oxalate-manufacturer.html [L,R=301]
RewriteRule ^products/calcium-propionate\.html$ /products/calcium-propionate-manufacturer.html [L,R=301]
RewriteRule ^products/calcium-sulphate\.html$ /products/calcium-sulphate-manufacturer.html [L,R=301]
RewriteRule ^products/carrageenan\.html$ /products/carrageenan-gum-manufacturer.html [L,R=301]
RewriteRule ^products/carrageenan-gum\.html$ /products/carrageenan-gum-manufacturer.html [L,R=301]
RewriteRule ^products/citric-acid-anhydrous\.html$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^products/creatine\.html$ /products/creatine-monohydrate-manufacturer.html [L,R=301]
RewriteRule ^products/creatine-monohydrate\.html$ /products/creatine-monohydrate-manufacturer.html [L,R=301]
RewriteRule ^products/di-ammonium-phosphate\.html$ /products/di-ammonium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/di-calcium-phosphate-anhydrous\.html$ /products/di-calcium-phosphate-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^products/di-potassium-phosphate-anhydrous\.html$ /products/di-potassium-phosphate-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^products/disodium-diphosphate\.html$ /products/sodium-acid-pyrophosphate.html [L,R=301]
RewriteRule ^products/disodium-hydrogen-ortho-phosphate\.html$ /products/disodium-hydrogen-ortho-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/disodium-ribonucleotides-ig-cj-tide\.html$ /products/disodium-ribonucleotides-ig-cj-tide-manufacturer.html [L,R=301]
RewriteRule ^products/distilled-monoglycerides\.html$ /products/distilled-monoglycerides-manufacturer.html [L,R=301]
RewriteRule ^products/erythritol\.html$ /products/erythritol-manufacturer.html [L,R=301]
RewriteRule ^products/ferric-pyrophosphate\.html$ /products/ferric-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^products/fructo-oligo-saccharide\.html$ /products/fructo-oligo-saccharide-manufacturer.html [L,R=301]
RewriteRule ^products/fructooligosaccharides-fos-liquid-55\.html$ /products/fructooligosaccharides-fos-liquid-55-manufacturer.html [L,R=301]
RewriteRule ^products/fructose\.html$ /products/fructose-manufacturer.html [L,R=301]
RewriteRule ^products/glucono-delta-lactone\.html$ /products/glucono-delta-lactone-manufacturer.html [L,R=301]
RewriteRule ^products/gluconolactone\.html$ /products/glucono-delta-lactone-manufacturer.html [L,R=301]
RewriteRule ^products/glycerol-monostearate\.html$ /products/glycerol-monostearate-manufacturer.html [L,R=301]
RewriteRule ^products/iron-phosphate\.html$ /products/iron-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/isomalt\.html$ /products/isomalt-manufacturer.html [L,R=301]
RewriteRule ^products/l-arginine\.html$ /products/l-arginine-manufacturer.html [L,R=301]
RewriteRule ^products/l-citrulline\.html$ /products/l-citrulline-manufacturer.html [L,R=301]
RewriteRule ^products/l-glutamine\.html$ /products/l-glutamine-manufacturer.html [L,R=301]
RewriteRule ^products/l-tartaric-acid\.html$ /products/l-tartaric-acid-manufacturer.html [L,R=301]
RewriteRule ^products/lactic-acid-88\.html$ /products/lactic-acid-88-manufacturer.html [L,R=301]
RewriteRule ^products/lactic-acid-powder\.html$ /products/lactic-acid-powder-manufacturer.html [L,R=301]
RewriteRule ^products/locust-bean-gum\.html$ /products/locust-bean-gum-manufacturer.html [L,R=301]
RewriteRule ^products/magnesium-citrate-trihydrate\.html$ /products/magnesium-citrate-trihydrate-manufacturer.html [L,R=301]
RewriteRule ^products/magnesium-sulphate\.html$ /products/magnesium-sulphate-manufacturer.html [L,R=301]
RewriteRule ^products/maltitol\.html$ /products/maltitol-manufacturer.html [L,R=301]
RewriteRule ^products/mono-ammonium-phosphate\.html$ /products/mono-ammonium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/mono-calcium-phosphate\.html$ /products/mono-calcium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/mono-potassium-phosphate\.html$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/potassium-acetate\.html$ /products/potassium-acetate-manufacturer.html [L,R=301]
RewriteRule ^products/potassium-bicarbonate\.html$ /products/potassium-bicarbonate-manufacturer.html [L,R=301]
RewriteRule ^products/potassium-chloride\.html$ /products/potassium-chloride-manufacturer.html [L,R=301]
RewriteRule ^products/potassium-citrate\.html$ /products/potassium-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/potassium-dihydrogen-orthophosphate\.html$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/potassium-sorbate\.html$ /products/potassium-sorbate-manufacturer.html [L,R=301]
RewriteRule ^products/sapp\.html$ /products/sodium-acid-pyrophosphate.html [L,R=301]
RewriteRule ^products/sodium-acid-pyrophosphate-2\.html$ /products/sodium-acid-pyrophosphate.html [L,R=301]
RewriteRule ^products/shmp\.html$ /products/sodium-hexa-meta-phosphate-shmp-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-benzoate\.html$ /products/sodium-benzoate-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-citrate\.html$ /products/sodium-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-diacetate\.html$ /products/sodium-diacetate-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-dihydrogen-orthophosphate\.html$ /products/sodium-dihydrogen-orthophosphate-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-hexa-meta-phosphate-shmp\.html$ /products/sodium-hexa-meta-phosphate-shmp-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-lactate\.html$ /products/sodium-lactate-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-oxalate\.html$ /products/sodium-oxalate-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-phosphate-dibasic-anhydrous\.html$ /products/sodium-phosphate-dibasic-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-phosphate-monobasic-monohydrate\.html$ /products/sodium-phosphate-monobasic-monohydrate-manufacturer.html [L,R=301]
RewriteRule ^products/sorbic-acid\.html$ /products/sorbic-acid-manufacturer.html [L,R=301]
RewriteRule ^products/sorbitol-powder\.html$ /products/sorbitol-powder-manufacturer.html [L,R=301]
RewriteRule ^products/soya-protein-isolate\.html$ /products/soya-protein-isolate-manufacturer.html [L,R=301]
RewriteRule ^products/stevia\.html$ /products/stevia-sweetener-97-manufacturer.html [L,R=301]
RewriteRule ^products/stevia-sweetener-97\.html$ /products/stevia-sweetener-97-manufacturer.html [L,R=301]
RewriteRule ^products/sucralose\.html$ /products/sucralose-e955-sweetener-manufacturer.html [L,R=301]
RewriteRule ^products/sucralose-e955-sweetener\.html$ /products/sucralose-e955-sweetener-manufacturer.html [L,R=301]
RewriteRule ^products/taurine\.html$ /products/taurine-manufacturer.html [L,R=301]
RewriteRule ^products/tetra-potassium-pyrophosphate\.html$ /products/tetra-potassium-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^products/tetra-sodium-pyrophosphate\.html$ /products/tetra-sodium-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^products/tri-calcium-phosphate\.html$ /products/tri-calcium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/xanthan-gum\.html$ /products/xanthan-gum-manufacturer.html [L,R=301]
RewriteRule ^products/xylitol\.html$ /products/xylitol-manufacturer.html [L,R=301]
RewriteRule ^products/zinc-acetate\.html$ /products/zinc-acetate-manufacturer.html [L,R=301]
RewriteRule ^products/zinc-carbonate\.html$ /products/zinc-carbonate-manufacturer.html [L,R=301]
RewriteRule ^products/zinc-citrate\.html$ /products/zinc-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/zinc-phosphate\.html$ /products/zinc-phosphate-manufacturer.html [L,R=301]
# v7 (2026-07-10): 8 legacy duplicate product files redirected (7 to canonical, CMC to homepage)
RewriteRule ^products/buy-soya-protein-isolate-90\.html$ /products/soya-protein-isolate-manufacturer.html [L,R=301]
RewriteRule ^products/disodium-hydrogen-phosphate-supplier\.html$ /products/disodium-hydrogen-ortho-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/magnesium-malate-2\.html$ /products/magnesium-malate.html [L,R=301]
RewriteRule ^products/neomalt-200x-sweetener-manufacturer\.html$ /products/neomalt-200x.html [L,R=301]
RewriteRule ^products/neotame-e961-sweetener-manufacturerq\.html$ /products/neotame-sweetener-powder.html [L,R=301]
RewriteRule ^products/sodium-aluminium-phosphate-salp-manufacturer\.html$ /products/sodium-aluminium-phosphate.html [L,R=301]
RewriteRule ^products/tetra-sodium-pyrophosphate-manufacturer-introduction\.html$ /products/tetra-sodium-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^products/carboxymethyl-cellulose-cmc\.html$ / [L,R=301]

# ── SECTION 9: Generic catchall for remaining /product/ URLs ─
# v4: redirect to the product file only if it exists; otherwise the catalogue.
RewriteCond %{DOCUMENT_ROOT}/products/$1.html -f
RewriteRule ^product/([a-z0-9-]+)/?$ /products/$1.html [L,R=301]
RewriteRule ^product/ /products.html [L,R=301]

# ── SECTION 10: /products/slug/ trailing slash catchall ──────
# v4: redirect to the product file only if it exists; otherwise the catalogue.
RewriteCond %{DOCUMENT_ROOT}/products/$1.html -f
RewriteRule ^products/([a-z0-9-]+)/?$ /products/$1.html [L,R=301]
RewriteRule ^products/([a-z0-9-]+)/?$ /products.html [L,R=301]

# ── SECTION 11: Chemical synonym redirects (78 rules) ────────
# Phosphate synonyms
RewriteRule ^products/sodium-phosphate-dibasic\.html$ /products/di-sodium-hydrogen-ortho-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/disodium-phosphate\.html$ /products/di-sodium-hydrogen-ortho-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/dsp\.html$ /products/di-sodium-hydrogen-ortho-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/monosodium-phosphate\.html$ /products/sodium-dihydrogen-orthophosphate-manufacturer.html [L,R=301]
RewriteRule ^products/msp\.html$ /products/sodium-dihydrogen-orthophosphate-manufacturer.html [L,R=301]
RewriteRule ^products/trisodium-phosphate\.html$ /products/tri-sodium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/tsp\.html$ /products/tri-sodium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-phosphate-tribasic\.html$ /products/tri-sodium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/mkp\.html$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/potassium-dihydrogen-phosphate\.html$ /products/mono-potassium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/tkp\.html$ /products.html [L,R=301]
RewriteRule ^products/tripotassium-phosphate\.html$ /products.html [L,R=301]
RewriteRule ^products/tcp\.html$ /products/tri-calcium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/dcp\.html$ /products/di-calcium-phosphate-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^products/mcp\.html$ /products/mono-calcium-phosphate-manufacturer.html [L,R=301]
RewriteRule ^products/tspp\.html$ /products/tetra-sodium-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^products/tetrasodium-pyrophosphate\.html$ /products/tetra-sodium-pyrophosphate-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-hexametaphosphate\.html$ /products/sodium-hexa-meta-phosphate-shmp-manufacturer.html [L,R=301]
RewriteRule ^products/grahams-salt\.html$ /products/sodium-hexa-meta-phosphate-shmp-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-pyrophosphate-acid\.html$ /products/sodium-acid-pyrophosphate.html [L,R=301]
RewriteRule ^products/salp\.html$ /products/sodium-aluminium-phosphate.html [L,R=301]
RewriteRule ^products/ferric-pyrophosphate-iron\.html$ /products/ferric-pyrophosphate-manufacturer.html [L,R=301]
# Citrate synonyms
RewriteRule ^products/trisodium-citrate\.html$ /products/sodium-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-citrate-dihydrate\.html$ /products/sodium-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/e331\.html$ /products/sodium-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/tripotassium-citrate\.html$ /products/potassium-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/potassium-citrate-monohydrate\.html$ /products/potassium-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/e332\.html$ /products/potassium-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/calcium-citrate-anhydrous\.html$ /products/calcium-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/tricalcium-citrate\.html$ /products/calcium-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/e333\.html$ /products/calcium-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/ccm\.html$ /products/calcium-citrate-malate-manufacturer.html [L,R=301]
RewriteRule ^products/magnesium-citrate-anhydrous\.html$ /products/magnesium-citrate-trihydrate-manufacturer.html [L,R=301]
RewriteRule ^products/trimagnesium-citrate\.html$ /products/magnesium-citrate-trihydrate-manufacturer.html [L,R=301]
RewriteRule ^products/ferric-citrate\.html$ /products/ferric-ammonium-citrate.html [L,R=301]
RewriteRule ^products/ferrous-citrate\.html$ /products/ferrous-gluconate.html [L,R=301]
RewriteRule ^products/zinc-citrate-dihydrate\.html$ /products/zinc-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/trizinc-citrate\.html$ /products/zinc-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/citric-acid-monohydrate\.html$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^products/citric-acid-food-grade\.html$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
RewriteRule ^products/e330\.html$ /products/citric-acid-anhydrous-manufacturer.html [L,R=301]
# Acetate synonyms
RewriteRule ^products/calcium-acetate-monohydrate\.html$ /products/calcium-acetate-e263-manufacturer.html [L,R=301]
RewriteRule ^products/e263\.html$ /products/calcium-acetate-e263-manufacturer.html [L,R=301]
RewriteRule ^products/lime-acetate\.html$ /products/calcium-acetate-e263-manufacturer.html [L,R=301]
RewriteRule ^products/magnesium-acetate-tetrahydrate\.html$ /products/magnesium-acetate-manufacturer.html [L,R=301]
RewriteRule ^products/zinc-acetate-dihydrate\.html$ /products/zinc-acetate-manufacturer.html [L,R=301]
RewriteRule ^products/zinc-diacetate\.html$ /products/zinc-acetate-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-acetate-trihydrate\.html$ /products/buy-sodium-acetate-anhydrous.html [L,R=301]
RewriteRule ^products/e262\.html$ /products/buy-sodium-acetate-anhydrous.html [L,R=301]
RewriteRule ^products/e262ii\.html$ /products/sodium-diacetate-manufacturer.html [L,R=301]
RewriteRule ^products/sodium-diacetate-food-grade\.html$ /products/sodium-diacetate-manufacturer.html [L,R=301]
RewriteRule ^products/potassium-acetate-food-grade\.html$ /products/potassium-acetate-manufacturer.html [L,R=301]
RewriteRule ^products/e261\.html$ /products/potassium-acetate-manufacturer.html [L,R=301]
# Sulphate synonyms
RewriteRule ^products/magnesium-sulfate\.html$ /products/magnesium-sulphate-manufacturer.html [L,R=301]
RewriteRule ^products/epsom-salt\.html$ /products/magnesium-sulphate-manufacturer.html [L,R=301]
RewriteRule ^products/mgso4\.html$ /products/magnesium-sulphate-manufacturer.html [L,R=301]
RewriteRule ^products/ferrous-sulfate\.html$ /products/ferrous-gluconate.html [L,R=301]
RewriteRule ^products/ferric-sulfate\.html$ /products/ferrous-fumarate.html [L,R=301]
RewriteRule ^products/iron-sulfate\.html$ /products/ferrous-gluconate.html [L,R=301]
RewriteRule ^products/zinc-sulfate\.html$ /products/zinc-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/znso4\.html$ /products/zinc-citrate-manufacturer.html [L,R=301]
RewriteRule ^products/calcium-sulfate\.html$ /products/calcium-sulphate-manufacturer.html [L,R=301]
RewriteRule ^products/gypsum-food-grade\.html$ /products/calcium-sulphate-manufacturer.html [L,R=301]
RewriteRule ^products/caso4\.html$ /products/calcium-sulphate-manufacturer.html [L,R=301]
RewriteRule ^products/anhydrite\.html$ /products/calcium-sulphate-manufacturer.html [L,R=301]
# Chloride synonyms
RewriteRule ^products/potassium-chloride-food-grade\.html$ /products/potassium-chloride-manufacturer.html [L,R=301]
RewriteRule ^products/kcl-food-grade\.html$ /products/potassium-chloride-manufacturer.html [L,R=301]
RewriteRule ^products/salt-substitute\.html$ /products/potassium-chloride-manufacturer.html [L,R=301]
RewriteRule ^products/low-sodium-salt\.html$ /products/potassium-chloride-manufacturer.html [L,R=301]
RewriteRule ^products/fcc-kcl\.html$ /products/potassium-chloride-manufacturer.html [L,R=301]
RewriteRule ^products/ammonium-chloride-food-grade\.html$ /products/ammonium-chloride-manufacturer.html [L,R=301]
RewriteRule ^products/nh4cl-food-grade\.html$ /products/ammonium-chloride-manufacturer.html [L,R=301]
RewriteRule ^products/sal-ammoniac\.html$ /products/ammonium-chloride-manufacturer.html [L,R=301]
RewriteRule ^products/magnesium-chloride-food-grade\.html$ /products.html [L,R=301]
RewriteRule ^products/nigari\.html$ /products.html [L,R=301]
RewriteRule ^products/mgcl2\.html$ /products.html [L,R=301]
RewriteRule ^products/tofu-coagulant\.html$ /products.html [L,R=301]

# ── CACHE CONTROL ────────────────────────────────────────────
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
  ExpiresByType image/jpeg "access plus 6 months"
  ExpiresByType image/png "access plus 6 months"
  ExpiresByType image/webp "access plus 6 months"
  ExpiresByType text/html "access plus 1 hour"
</IfModule>

# ── GZIP Compression ─────────────────────────────────────────
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript text/xml
</IfModule>
