How to Remove default.aspx from Your Root URL (301 Redirect)

Ranjeet_8
Posted by Ranjeet_8 under ASP.NET category on | Points: 40 | Views : 1974
Add this script on your default page.

<script language="javascript" type="text/javascript">
var Yoururl = location.href;
if (Yoururl.toLowerCase() == "http://www.YourDomainName.com/default.aspx" || Yoururl.toLowerCase() == "http://www.YourDomainName.com/#") {
window.location = "http://www.YourDomainName.com";
}
</script>

Comments or Responses

Posted by: Samarmir on: 11/27/2012 Level:Starter | Status: [Member] | Points: 10
Why would you need this'? When is this useful ?

Login to post response