I found another way around for 301 redirects, it's like this:
Put all your web domain to a single IIS Site. (the first Site) (e.g. www.domain.fr, www.domain.com.pk, www.domain.co.th, www.xyzdomain.com)
Make another IIS Site for the main website (the second Site) (e.g. www.newdomain.com)
Now put an asp / php / asp.net code for redirecting based on the conditions you have, in my case i used asp classic and put some code like this:
If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("www.domain.fr") ) > 0 Then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.newdomain.com/fr/"
Response.End
ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("www.domain.com.pk") ) > 0 Then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.newdomain.com/pk/"
Response.End