Это довольно простейшая настройка для .htaccess & mod_rewrite:
RewriteEngine On
# Don't rewrite if the file or directory actually exists
# protects against a rewrite loop if index.php is hit
# and allows css, js, images not to be messed with
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite everything to the dir=parameter, appending any existing querystring with QSA
RewriteRule ^(.*)$ index.php?dir=$1 [L,QSA]
Это должно включить URL, такие как