I am writing in the Application_BeginRequest part of my Global.asax.cs.
For SEO purposes, I'm trying to redirect users that are looking at:
http://www.example.com/Default.aspx
to:
http://www.example.com/
My question is:
How can I tell which the user is looking at? I've been using:
HttpContext.Current.Request.Url.*
But all the parameters are identical regardless of which one I am visiting.
You can get the path entered in the user's browser with:
string path = Request.RawUrl;
MSDN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With