1

I want to remove the file-extension (like .html) for users of IE, FF and google Chrome.

I have a hyperlink like : www.coco/New.html.

When I type www.coco/New I receive a 404 error.

I want users to only type www.coco/New in all browsers.

What can I do in ASP " visual web developer "?
Is it possible to adding some code in project "Web.config"?

GitaarLAB
  • 14,536
  • 11
  • 60
  • 80
user2296278
  • 528
  • 1
  • 4
  • 17
  • 1
    You tagged this as classic ASP and ASP.NET. Which is it? – mason Jun 29 '14 at 15:39
  • 1
    What have you tried, what did google/stackoverflow tell you? Psst...possible duplicate http://stackoverflow.com/questions/223750/how-do-net-sites-hide-aspx-extension-of-their-files points to http://weblogs.asp.net/scottgu/tip-trick-url-rewriting-with-asp-net – GitaarLAB Jun 29 '14 at 15:41
  • [This](http://stackoverflow.com/a/24347759/304683) should be your moment of zen for `ASP.Net WebPages` - it was for me :) In fact I could even add `Razor` code to any HTML page, though without `Intellisense` :) – EdSF Jun 29 '14 at 17:18
  • You need URL Rewrite mechanism, it's on the server level, usually without actual code. – Shadow The GPT Wizard Jun 30 '14 at 09:14

1 Answers1

0

Change / duplicate the file name as index.html then save it in a folder named New so the url will be www.coco/New/index.html then the page will also display when www.coco/New is typed

Barry Dowd
  • 168
  • 5