RewriteEngine On
RewriteRule ^(.*)$ index.php?pattern=$1 [QSA,L]