That is definitely a bug in the Url Aliases package.
The quickest way around this would likely be to roll your own http module, at least until a fix is published.
You can snag the source from the package's repo on GitHub and tweak it to fix the issue, making sure that you unregister the bundled http module from web.config and register your own instead.
The current http module source is here: https://github.com/CPHCloud/c1packages-urlaliases/blob/v1.0.2/CphCloud.Packages.UrlAlias/UrlAliasHttpModule.cs
Change the value of incomingUrlPath
to use PathAndQuery
instead of AbsolutePath
, like this:
...
static void httpApplication_BeginRequest(object sender, EventArgs e)
{
var httpApplication = (HttpApplication)sender;
var incomingUrlPath = HttpUtility.UrlDecode(httpApplication
.Context.Request.Url.PathAndQuery.TrimEnd(new[] { '/' }));
....
In your web.config file you should unregister Url ALiases' handler
<!--add name="UrlAlias" type="CphCloud.Packages.UrlAlias.UrlAliasHttpModule,
CphCloud.Packages.UrlAlias,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /-->
and register your own
<add name="CustomUrlAlias" type="CphCloud.Packages.UrlAlias.UrlAliasHttpModule,
YourAssemblyName,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
Full disclosure: I'm the author of the URL Aliases package.