Hide .html extention from url ????

Discussion in 'HTML & Website Design' started by dojever, Aug 26, 2009.

  1. #1
    HI,

    am looking for way to hide .html :
    ie : www.mike.com/fun.html
    to be www.mike.com/fun/


    if you know a method "WORKING ONE" will you share it ...
    it will be great if it will run on .htaccess


    Thanks
     
    dojever, Aug 26, 2009 IP
  2. Zizzi

    Zizzi Peon

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just make a directory called fun. And put a file called index.html in the fun folder.

    So:
    www.site.com/fun/index.html
    Code (markup):
    Will look like this in a browser:
    www.site.com/fun/
    Code (markup):
     
    Zizzi, Aug 26, 2009 IP
  3. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #3
    Put this in ur .htaccess

    
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule fun/$ /fun.html
    
    Code (markup):
     
    Bohra, Aug 26, 2009 IP
  4. seovirus

    seovirus Guest

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    make a folder in ur root directroy with name Fun
    Eg:-
    www.mike.com/fun/
    and put ur webpage as
    index.html in Fun folder and just run www.mike.com/fun it u would able to open this page without extention
     
    seovirus, Aug 26, 2009 IP
  5. rvk.dot

    rvk.dot Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    mod rewrite

    check whether your server has mod rewrite and add a htaccess file
     
    rvk.dot, Aug 27, 2009 IP
  6. dojever

    dojever Peon

    Messages:
    284
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks i try the file and index inside working fine...

    i will also try .haccess Thanks guys
     
    dojever, Aug 28, 2009 IP
  7. Paulie

    Paulie Active Member

    Messages:
    749
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    81
    #7
    You want to do the above, this is the easiest and quickest way.

    As mentioned make a directory called fun and place the index file inside it, that way when you go to the URL www.site.com/fun it will load the index page
     
    Paulie, Aug 28, 2009 IP