locked
How can i hide file names ex. default.aspx in url after my domain name? RRS feed

  • Question

  • User-1172226785 posted

    Is it possible to hide the file names ex: default.aspx after my domain name and is it recommended? 

    I want users only to see www.domain.com whether they are on domain.com/about.aspx or any other pages, only domain.com should be visible in the url.

    Please let me know your suggestions

    Cheers,
    X.

    Friday, March 11, 2011 4:56 PM

Answers

All replies

  • User-195474149 posted

    You can use URL Routing in ASP.Net (4.0 supports Web Forms), or you can do it much easier in IIS7. Download URL Rewriting.

    Friday, March 11, 2011 5:34 PM
  • User-873890331 posted

    Hi,

    Please check this Blog post ?

    http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

    Here you find the 3 Methods for Url Rewrite with simple code in web.config . It will helps to you.

    Regards

    Shwetamber Chourey

    India

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, March 12, 2011 12:53 AM
  • User-576912550 posted

    I want users only to see www.domain.com whether they are on domain.com/about.aspx or any other pages, only domain.com should be visible in the url.

    Hi on your home page you can put iframe and display ur site in that iframe. in this ur browser url will not change. But be sure iframe does not resize automatically so u need to do some javascript tweak for that.

    Saturday, March 12, 2011 1:27 AM
  • User-801004448 posted

    What is the reason to show domain only in address bar?

    People cannot bookmark specific link on your site if you mask all links with domain name only.

    Sunday, March 13, 2011 7:42 PM
  • User-1172226785 posted

    That is a valid point, i did not think about that one. 

    Cheers,
    X.

    Thursday, March 17, 2011 1:13 AM
  • User55467566 posted

    It is much better practices to store names, paths and filenames in database and use “Global.asax”. By adding Module in “Application_Start” procedure in "Global.asax" and developing “routes” module in “App_Start” with simple “while SqlDataReader.read” loop you can have updated paths. I already developed site with 450 pages (simple website of 15 pages who generate content) I didn’t notice any troubles.

    This is really useful because of several reasons:

    1. You can store page description and keywords so you can generate headers
    2. You can simply change paths if you reorganize folders
    3. You can simply add routes if you develop CMS system and user creates new pages
    4. It is really easy optimize headers for  SEO if content of page is changed
    Friday, January 10, 2014 7:56 AM