{
  "id": "01",
  "content": [
    {
      "type": "heading",
      "text": ".htaccess: What & When"
    },
    {
      "type": "text",
      "html": ".htaccess files are per-directory configuration files for the Apache HTTP Server. They apply to the directory they live in and all sub\u2011directories (unless overridden)."
    },
    {
      "type": "text",
      "html": "<strong>Enablement:</strong> The server must allow overrides in <code>httpd.conf</code>/<code>apache2.conf</code> with <code>AllowOverride</code> (e.g., <code>AllowOverride All</code> for the target directory)."
    },
    {
      "type": "text",
      "html": "<strong>Performance note:</strong> Apache checks .htaccess on each request; prefer central config for busy sites. .htaccess is perfect for shared hosting or quick, app\u2011local rules."
    }
  ],
  "quiz": {
    "questions": [
      {
        "id": "q1",
        "type": "single",
        "text": "What does .htaccess primarily control?",
        "options": [
          {
            "id": "a",
            "text": "Per-directory Apache behavior"
          },
          {
            "id": "b",
            "text": "MySQL schemas"
          },
          {
            "id": "c",
            "text": "Nginx virtual hosts"
          }
        ],
        "correct": [
          "a"
        ]
      },
      {
        "id": "q2",
        "type": "single",
        "text": "Which directive must allow .htaccess rules?",
        "options": [
          {
            "id": "a",
            "text": "AllowOverride"
          },
          {
            "id": "b",
            "text": "AllowHtaccess"
          },
          {
            "id": "c",
            "text": "EnablePerDir"
          }
        ],
        "correct": [
          "a"
        ]
      }
    ]
  }
}