Remove or hide .html extension

9 replies
  • WEB DESIGN
  • |
how can i remove or hide .html extension in website while i have all the pages in html. i am using IIS and i dont know how can i do this. Please help me if you can
#extension #hide #html #remove
  • Profile picture of the author Andrew H
    Take your question and type it into google and you will find:

    asp.net - Remove HTML or ASPX Extension - Stack Overflow
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[6400759].message }}
  • Profile picture of the author lamzoR
    google would solve your problem, also: htaccess parameters
    {{ DiscussionBoard.errors[6401027].message }}
  • Yes. .htaccess parameters ca do this. Please use a .htaccess generator for this.
    Signature
    {{ DiscussionBoard.errors[6401484].message }}
  • Profile picture of the author karlhampton
    This is what you have to create in the .htaccess file:

    RewriteEngine On
    RewriteRule ^page1$ page1.htm
    RewriteRule ^page2$ page2.htm
    RewriteRule ^page3$ page3.htm


    Obviously you have to create a RewriteRule line for every page you have on your site.. and that's about it!



    Originally Posted by vistanet View Post

    how can i remove or hide .html extension in website while i have all the pages in html. i am using IIS and i dont know how can i do this. Please help me if you can
    Signature

    Looking for Affiliates to promote a hot unlock iphone & jailbreak iphone website - Memberships selling like crazy! - 50% Commissions

    Unlock iPhone Affiliate Program

    {{ DiscussionBoard.errors[6419670].message }}
  • Profile picture of the author maxpine11
    Yes, you put that code into .htaccess, test it thoroughly, and then and remove the ".html" extension from the URLs in the linkson your pages. <a href="blah.html"> should be changed to <a href="blah">
    {{ DiscussionBoard.errors[6439647].message }}
    • Profile picture of the author Lloyd Buchinski
      The simplest way to do it is by replacing files with folders. I put up a page with the details at get rid of file extensions.
      Signature

      Do something spectacular; be fulfilled. Then you can be your own hero. Prem Rawat

      The KimW WSO

      {{ DiscussionBoard.errors[6441879].message }}
  • Profile picture of the author sodevious
    The easiest route is to use folders. For example, if you have a file called sales.html, instead make a folder called /sales/ and place the html file inside, and rename it index. Now the url will be yoursite.com/sales/ instead of yoursite.com/sales.html.
    {{ DiscussionBoard.errors[6441892].message }}
  • Profile picture of the author Doc Fluty
    The folders idea is awesome guys!

    But i thought i read somewhere that google looks even into the name of the page for clues as to its priority.

    For example a page names free-widgets.html would rank higher (all other things being the same) than another index.html

    Feel free to correct me if im wrong.
    {{ DiscussionBoard.errors[6443089].message }}
  • Profile picture of the author enavagate
    Google considers the whole url for that page as the "page name" so I wouldn't be too concerned with the page name being index.html. That's why it's better to have your keyword in the domain name but it's not a game killer if you don't. Just make sure it gets into the URL.
    Signature
    Sick of Trying Everything The "Gurus" Do And Ending Up With
    Results That Are Making Your Friends & Family Question Your Sanity?


    >>>
    Conquering Your Internet Marketing Giants<<<
    {{ DiscussionBoard.errors[6443277].message }}

Trending Topics