Hello,
I think firstly you should check the NodeAliasPath by TreeProvider, next if that the URL isn't NodeAliasPath you should check the CMS_DocumentAlias table to check to which NodeID is it connect and retrive it, for example using mentioned before TreeProvider. You can also use the DocumentHelper.GetDoccuments(...)
My example with TreeProvider:
string aliasPath = URLHelper.RemoveExtension("/TestPage.aspx");
TreeProvider tree = new TreeProvider(MembershipContext.AuthenticatedUser);
var node = tree.SelectSingleNode(SiteContext.CurrentSiteName, aliasPath, "en-US");
if (node == null)
{
var aliases = DocumentAliasInfoProvider.GetDocumentAliases(aliasPath, 1);
if (!DataHelper.DataSourceIsEmpty(aliases))
{
node = tree.SelectSingleNode(ValidationHelper.GetInteger(aliases.Tables[0].Rows[0]["AliasNodeID"], -1));
}
}