Finally solved!
I changed the alternate access mapping configuration before to support forward to full domain URL, as you can see the following image:
![Image]()
Using this configuration, when user types "http://site/subsite/", automatically it will be forwarded to "http://site.domain.com/subsite/". But there's a problem...
If the user types the entire URL (that's include the path to file.aspx page) WITHOUT DOMAIN SUFFIX, it will not be forwarded and where's the problem lies; because it will finish with a ugly cross-domain access error.
But after applying some changes to Alternate Access Mapping like the following image:
![Image]()
And accessing just by the site name (without domain suffix), is enough to SharePoint know that it's not cross-domain access!
Of course it will not forwarded to full domain URL (as I would like), but will not consider differents URL to the same path as a cross-site access, that's safer when thinking about code compatibility.
Thanks for all help!
I changed the alternate access mapping configuration before to support forward to full domain URL, as you can see the following image:

Using this configuration, when user types "http://site/subsite/", automatically it will be forwarded to "http://site.domain.com/subsite/". But there's a problem...
If the user types the entire URL (that's include the path to file.aspx page) WITHOUT DOMAIN SUFFIX, it will not be forwarded and where's the problem lies; because it will finish with a ugly cross-domain access error.
But after applying some changes to Alternate Access Mapping like the following image:

And accessing just by the site name (without domain suffix), is enough to SharePoint know that it's not cross-domain access!
Of course it will not forwarded to full domain URL (as I would like), but will not consider differents URL to the same path as a cross-site access, that's safer when thinking about code compatibility.
Thanks for all help!