Options FollowSymLinks
RewriteEngine On

#Language Context
RewriteRule ^([a-z][a-z])/(.*)$ ./$2?%{QUERY_STRING}&LANG=$1

#Country Context
RewriteRule ^([A-Z][A-Z])/(.*)$ ./$2?%{QUERY_STRING}&COUNTRY_CODE=$1

#Compere Restricted Context
# The leading "s" stands for "space".
RewriteRule ^s([0-9]+)/(.*)?$ ./$2?%{QUERY_STRING}&CPID=$1

#Non-Cookie Mobile Setting
RewriteRule ^m-([^\/]+)/(.*)$ ./$2?%{QUERY_STRING}&NOCOOKIE=1&MOBILE=1&SESSIONID=$1
RewriteRule ^m/(.*)$ ./$1?%{QUERY_STRING}&NOCOOKIE=1&MOBILE=1

#Retrieve Theme Image
RewriteRule ^image/(.*)$ ./?cmd=getimage&NOSESSION=1&file=$1&%{QUERY_STRING}

#Theme
RewriteRule ^thm-([a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])/(.*)$ ./$2?%{QUERY_STRING}&THEME=$1

#shortcuts
RewriteRule ^([a-z][a-z][a-z.]+)$ ./base/index.php?cmd=$1&%{QUERY_STRING}
RewriteRule ^$ ./home
