Setting the default URL in Web.Config for the website

When users go to my site, I want it to display:

http://example.com 

and not:

http://example.com/default.aspx

How can i do this?

+3
source share
5 answers

This is done from IIS:

You can also do this by setting some URL mappings. See here for more details .

+11
source

It is possible (really encouraged) with IIS7, but the only way I know to do in IIS6 is with ugly urlmapping tricks

<system.web>
  <urlMappings>
    <add url="~/Default.aspx" mappedUrl="~/YourPage.aspx"/>
  </urlMappings>
</system.web>
+1
source

IIS, , " ".

0

- IIS, IIS Windows, " ". , index.aspx , .

admin script (vbscript) :

set node=getObject("IIS://LocalHost/W3SVC/1/Root")
node.defaultdoc = "index.aspx" & "," & node.defaultdoc
node.setinfo
0

in IIS->your site->right click->property->Default Document

,

0

Source: https://habr.com/ru/post/1706815/


All Articles