Courseiva
DNS, Web and Mail ServiceseasyMultiple ChoiceObjective-mapped

LPIC-2 DNS, Web and Mail Services Practice Question

Which Apache module is used to rewrite URLs based on rules?

⚠ Common exam trap

It's easy for candidates to confuse mod_alias's Redirect directive (which performs simple, static redirects) with the dynamic, rule-based rewriting capability of mod_rewrite, or incorrectly assume a module named 'mod_redirect' exists.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

mod_rewrite

mod_rewrite is the correct Apache module for rewriting URLs based on rules. It uses a regular expression engine to match incoming request URIs against patterns defined in .htaccess or server configuration files, then transforms them according to specified substitution rules. This module is essential for creating clean URLs, redirecting traffic, and implementing URL-based access control.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • mod_rewrite

    Why this is correct

    mod_rewrite is the module that provides a rule-based rewriting engine.

  • mod_proxy

    Why it's wrong here

    mod_proxy is used to proxy requests to another server, not for URL rewriting.

  • mod_alias

    Why it's wrong here

    mod_alias provides simple URL mapping but not rule-based rewriting.

  • mod_redirect

    Why it's wrong here

    mod_redirect is not a standard Apache module; redirects are implemented by mod_alias or mod_rewrite.

About these practice questions

Courseiva writes every LPIC-2 question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.