RewriteEngine On
RewriteCond $1 !^(php\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Options -Indexes
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?localhost/url_amigable/
RewriteRule ^(.*)$ http://localhost/url_amigable/$1 [R,L]

DirectoryIndex index.php index.html index.htm
RewriteRule ^([A-Za-z0-9]+[_]+[A-Za-z0-9]+)$ index.php?url=$1 [NC,L,QSA]

RewriteCond $1 !^(redirection/redireccion\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ redirection/redireccion.php?/$1 [L]