Warning
The recipe is marked that it needs to be reviewed. The provided information may be incomplete and/or outdated. Help us improve it!
Read the recipe carefully and report any improvements that could be made.

Problem

You want to map an URL in the browser to something else.

Solution

Activate and use mod_rewrite in your .htaccess file.

Discussion

#Activate the rewrite engine.
RewriteEngine on
#Setup a base path for the rewrite action. (optional)
RewriteBase /

#If the request is for a file that exists already on the server, the rewrite won't be applied.
RewriteCond %{REQUEST_FILENAME} !-f
#If the request is for a real directory (one that exists on the server), the rewrite won't be applied.
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all requests to index.php and append the request.
RewriteRule (.*) index.php/$1 [L]

More Information