I'm working on a website in aspx where a user can go to a url similar to "www.website.com/referralname" or "www.website.com/otherreferralname" and will be redirected to www.website.com/genericform.aspx?referral=referralname
I'm not the original designer of the site, and I'd like to add as little as possible, so I'm hoping there's a way to do this through the webconfig, rather than having to add a redirect page and switch case every possible referralname.
I've explored the possibility of using
<customErrors mode="RemoteOnly">
<error statusCode="404" redirect="~/404.aspx"/>
</customErrors>
But there is already code in the AppCode that somehow is overriding or supplanting mine, and anyhow it only shows the default 404 page. Any advice is greatly appreciated.
Edit: I've been informed that a .aspx won't work with the customErrors tag there, so that might be part of the problem. I'd also appreciate clarification on that issue as well. I will be learning a lot today!
Edit 2: So after doing a little more research, I think the search term that would have benefitted me is "Routing". I've found this MSDN page which I think will lead me to my solution. If this works out for me, I'll post a comment with the "answer" later.