PHP .htaccess -> URL bonito (ao contrário)

Se faço como reescrever URLs, por exemplo:www.example.com/index.php?id=1&cat=3 parawww.example.com/1/3/ (como queiras). Eu sei disso

O que eu não sei é como alterar todos os meus links em todas as páginas para vincular a URLs bonitas. Todos os links do meu site são antiquados <a href="index.php?id=1&cat=2">) e há muitos.

Estou perguntando se alguém tem uma idéia ou sabe como redirecionar automaticamente para esse URL bonito se o usuário clicar em index.php? Id = 1. (Quase como este site Stackoverflow, se você alterar o título no URL).

Então, minhas presunções são ...

Use .htaccess para ler o index.php? Id = 1 & cat = 2 para reescrever o índice / 1/3 que ele próprio interpreta novamente (estranho)

um arquivo php para fazer os redirecionamentos que o htaccess reescreve de volta ao original ...

Conclusão: alterar<a href="index.php?id=1&....."> automaticamente paraindex/1/2

RESOLVIDO
Options +FollowSymLinks
RewriteEngine On
RewriteBase /

##################################
# This turns index.php?id=1&cat=2 into index/1/2 and then back 'transparent' into    index.php?id=1&cat=2 if you have old fashioned
# links in your site and don't want to change them :)


# Avoid mod_rewrite infinite loops 
# This is critical if you want to use this code

RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]

# Hard-rewrite ("[R]") to "friendly" URL.
# Needs RewriteCond to match original querystring.
# Uses "?" in target to remove original querystring,
#   and "%n" backrefs to move its components.
# Target must be a full path as it's a hard-rewrite.
RewriteCond %{QUERY_STRING} ^id=(\d+)&cat=(\d+)$
RewriteRule ^index.php$ http://localhost/index/%1/%2/? [L,R]

# Soft-rewrite from "friendly" URL to "real" URL.
# Transparent to browser.
# Won't re-trigger the above rewrite, though I'm
#   not really sure why! The order of the rules
#   doesn't seem to make a difference.
RewriteRule ^index/(\d+)/(\d+)/$ index.php?id=$1&cat=$2 [L]

questionAnswers(2)

yourAnswerToTheQuestion