What is mod_rewrite and how is it used in PHP?
Mod_rewrite is an Apache module used for URL rewriting. It allows you to manipulate URLs and redirect them to different locations. In PHP, mod_rewrite is commonly used to create clean and user-friendly URLs for websites.
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?page=$1
Keywords
Related Questions
- What best practices should be followed when debugging PHP code in an IDE like Eclipse?
- What are some best practices for iterating through XML nodes in PHP to ensure accuracy and completeness?
- What is the alternative method for retrieving HTTP request headers in PHP if `apache_request_headers()` is not supported?