# PB Cambridge — /eduaid/ subsite routing
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /eduaid/

  # ── Legacy .html URLs -> new clean routes (301) ──
  RewriteRule ^index\.html$ /eduaid [R=301,L,NC]
  RewriteRule ^about\.html$ /eduaid/about [R=301,L,NC]
  RewriteRule ^contact\.html$ /eduaid/contact [R=301,L,NC]
  RewriteRule ^gallery\.html$ /eduaid/gallery [R=301,L,NC]
  RewriteRule ^get-involved\.html$ /eduaid/get-involved [R=301,L,NC]
  RewriteRule ^programs\.html$ /eduaid/programs [R=301,L,NC]

  # ── Block direct access to /pages source folder ──
  RewriteRule ^pages/ - [F,L]

  # ── Front controller: anything that isn't a real file/dir ──
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^ index.php [L]
</IfModule>

Options -Indexes
