RewriteEngine On RewriteCond %{REQUEST_FILENAME} !index.php RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*).php /admin/index.php?file=$1 [QSA,L]