Why do some people turn their asp.net pages into HTML pages when publishing?

I was just told that I might have to work on a project where I will work with ASP.NET 3.5 and C #. Someone from our team said that we should change all the pages to HTML when we publish the site. Therefore, instead of having www.test.com/Page.aspx, we will have www.test.com/Page.html

So I would like to know:

A.) How can this be done and with which tool?

B.) Why should this be done and what can we learn from it? (It was said to prevent hackers to get it)

C.) Is this recommended?

Thanks in advance.

+5
source share
7 answers

A) , Web.config:

<system.web>
    <httpHandlers>
        <add verb="*" path="*.html" type="System.Web.UI.PageHandlerFactory"/>
    </httpHandlers>
</system.web>

B). , , , , ASP.NET HTML (, ..).

C) , , .


:

, buildHandler:

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true">
      <buildProviders>
        <add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
      </buildProviders>
    </compilation>
    <httpHandlers>
      <add verb="*" path="*.html" type="System.Web.UI.PageHandlerFactory" />
    </httpHandlers>
  </system.web>
</configuration>
+9

B) C)

URL- , , , 10-20 ( ..), :

:

  • ids -
  • .html.php.jsp.do.aspx,
  • /controller/view/main, .

URL- , , , .

+5

, , ( ) - , .

+2

C) , , *.html ASP.NET, , , , - HTML- ( ).

+1

B) , , - . , , . -, , , .

0

A: MVC ASP.NET , URL, .

 routes.MapRoute("Route1", "Foo/{Cat}/{SubCat}/{Record}.html", new { controller = "Foo", action = "Record" });
0

SEO. Google URL-:

longurl.com/index.aspx?id=1&time=3&this=2

, URL- -, Google, , .

longurl.com/index/1/3/2.html

, Google , . , , . , , .

, -, URL- .

EDIT: , , . . , URL-, .

0

All Articles