I want to set URL Masking in asp.net to hide page name and querystring in URL.
Currently i am setting below code to perform url rewriting in Global Application File.
routeCollection.MapPageRoute("Login", "Login", "~/frmLogin.aspx");
But i want to rewrite URL in a way that it will show only domain name to end user. http://www.domainname.com - like this
Please help me to set it.
Thanks in advance,
You can set frmLogin.aspx page as default page in web server.
If you are using IIS 7, steps are as follows:
1.Select your website
2. In description click on default document
3. Add your page (frmLogin.aspx) in and set its priority.
We're using the following method in our application to show the sign-page simply on the domains. It can be modified for other pages as well.
In Global.asax:
routeCollection.MapPageRoute("SIGNIN", String.Empty, "~/signin.aspx");
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