Using the mod_rewrite module
Apache’s mod_rewrite module enables you to rewrite URLs. You can use URL rewrites in a number of scenarios, including:- Providing cleaner, more readable links to your web site. For example, instead of the URL http://www.example.com/products.php?id=232&cat=11, you could use the URL http://www.example.com/products/calculator instead with rewrites. In addition to making URLs more human-readable, they are also more search engine friendly, and can improve a web site’s ranking and searchability.
- Hiding the web site’s internal implementation. Using the previous URL example, we can hide the fact that the site is using PHP, as well as mask queries that attackers could potentially use for malicious purposes.