What is the purpose of mod_rewrite in PHP and how is it commonly used in web development?

Mod_rewrite in PHP is used to manipulate URLs and redirect requests on a web server. It is commonly used in web development to create user-friendly URLs, improve SEO, and handle URL redirections. This can help improve the overall user experience and make websites more accessible.

RewriteEngine On
RewriteRule ^about$ about.php [L]
RewriteRule ^contact$ contact.php [L]