Options -MultiViews
RewriteEngine On

# redirect "/image.php?slika=xxx&okvir=yy" to "/image/yy/xxxx"
RewriteCond %{THE_REQUEST} \s/image\.php\?slika=([A-Za-z0-9]+)&okvir=([0-9]+)\s [NC]
RewriteRule ^ /images/%2/%1? [R=301,L]

# internally rewrite "/section/xxx" to "/section.php?id=xxx"
RewriteRule ^images/([0-9]+)/([A-Za-z0-9]+)$ /image.php?slika=$2&okvir=$1 [L]
