.htaccess file:
# The original .htaccess file
# plus an ErrorDocument line so stuff makes sense

RewriteEngine On
RewriteRule (.*)/(.*) profile.php?id=$1&goto=$2&matched_rule=first [L]
RewriteRule (.*)/(.*)/ profile.php?id=$1&goto=$2&matched_rule=second [L]

# Just some housekeeping
ErrorDocument 404 /index.php

Contents of $_GET:
Array
(
    [id] => bulat
    [goto] => 
    [matched_rule] => first
)

This file is profile.php.