1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

how can i remove .html from url?

Discussion in 'HTML & Website Design' started by john1021, Dec 13, 2008.

  1. #1
    john1021, Dec 13, 2008 IP
  2. edukcuf

    edukcuf Greenhorn

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    You could rename the games.html to index.html and put it in a folder called games.
     
    edukcuf, Dec 13, 2008 IP
  3. freelikehell

    freelikehell Active Member

    Messages:
    128
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #3
    freelikehell, Dec 13, 2008 IP
  4. B.Williams

    B.Williams Active Member

    Messages:
    552
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #4
    But i want to remove index.html not only .html extension? How to remove this index.html from URL .. like domain.c0m/index.html to d0main.c0m/
     
    B.Williams, Jan 18, 2010 IP
  5. duckz

    duckz Active Member

    Messages:
    245
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    68
    #5
    strange, usually if you put the index.html in your server public_html or www directory then the accessible path for your site is http://www.yourdomain.com

    if this is not the case then you should check the .htaccess or contact your system admin
     
    duckz, Jan 18, 2010 IP
  6. mrpaisa

    mrpaisa Guest

    Messages:
    741
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    When i use extensionless "urls" they are actually index files each in their own folder. the url end with a trailing/ everytime.....
     
    mrpaisa, Jan 19, 2010 IP
  7. johagulo

    johagulo Peon

    Messages:
    880
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I do not think this is possible
     
    johagulo, Jan 19, 2010 IP
  8. duckz

    duckz Active Member

    Messages:
    245
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    68
    #8
    I think extensionless url is not possible to view in apache (assuming you are using apache) but if its viewing the index of your folder then I believe you should check your apache configuration to avoid prying eyes get your file listing.
     
    duckz, Jan 19, 2010 IP
  9. puffnpluky

    puffnpluky Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Let's say you wanted a page called Videos, but you wanted to type in example.com/videos instead of www.example.com/videos.html. This is what you would do. You would create a folder in your website called videos, and then put a .htm file in that folder. Now when ever someone types in www.example.com/videos , it will display that .htm page you put in the folder. I hope this helps.

    BTW I just found this out with my own site. http://www.liquidlettuce.com/puffnpluky76

    Please check out my site. :eek: :) :( :confused:
     
    puffnpluky, Mar 13, 2011 IP
  10. josephgriffin

    josephgriffin Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    you should learn about .htaccess and apache
    it is just wordpress permalink structure
     
    josephgriffin, Mar 14, 2011 IP
  11. deepspeed

    deepspeed Greenhorn

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #11
    .htcacces will help you out to get rid of this, though they might not have a perma solution.
     
    deepspeed, Mar 15, 2011 IP
  12. serenarichard

    serenarichard Peon

    Messages:
    80
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Rename the file to index.html and put in the folder domain.com/games/
    But remember to share your games page with slash ending after games "domain.com/games/"
    This is very important.
     
    serenarichard, Mar 16, 2011 IP
  13. johneva

    johneva Well-Known Member

    Messages:
    1,429
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    110
    #13
    .htaccess file

    with this in

    Options +MultiViews

    Then when you make links you can use the URL without the extension and it will work fine, this works great if your running php aswell.

    I normally also add in a 301 so requests for domain.com are sent to www.domain.com aswell so my basic .htaccess file normally contains atleast.

    Code (Text):
    1. Options +MultiViews
    2.  
    3. RewriteEngine on
    4. RewriteCond %{HTTP_HOST} ^([^.]+\.co.uk) [NC]
    5. RewriteRule (.*) http://www.%1/$1 [R=301,L]
    Example of a site I am currently working on to show you it works.

    http://www.slaughter-house.co.uk/sh/hair
     
    johneva, Mar 16, 2011 IP
  14. ACME Squares

    ACME Squares Peon

    Messages:
    98
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Like johneva said, turn on MultiViews

    MultiViews are seriously the way forward because they automate a lot of this stuff. For example, if you gzipped your file /something.html.gz you can access it using /something
    It really takes the hassle out when using mixed extensions.
     
    ACME Squares, Mar 16, 2011 IP
  15. submitmaster

    submitmaster Active Member

    Messages:
    330
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #15
    create a new folder in your FTP directory and call it anything you want e.g yoursite.com/games and in that folder make your index.html and your done
     
    submitmaster, Mar 16, 2011 IP
  16. johneva

    johneva Well-Known Member

    Messages:
    1,429
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    110
    #16
    Thing is thats not really the correct way to do it, yes it works but makes alot of work for no reason and also makes a mess of your directory system. That way means you have to make a new folder for every file you have for the site and rename all files to index.html. Really dont get why anybody would use that way its just confusing messy and makes extra work.

    Doing it with .htaccess file means making 1 file with 1 line of code in, then uploading it to your root, done, no file needs file extensions.
     
    johneva, Mar 17, 2011 IP
  17. techntuts

    techntuts Member

    Messages:
    197
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #17
    Use .htaccess file and reditect the games.html to games
     
    techntuts, Mar 18, 2011 IP
  18. ads2help

    ads2help Peon

    Messages:
    2,148
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #18
    ads2help, Mar 21, 2011 IP
  19. Floyd87

    Floyd87 Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Google 'htaccess mod_rewrite search engine friendly URLs'

    .htaccess is the file you will create/modify.
    mod_rewrite is the function you will be applying inside of .htaccess to create your search engine friendly (SEF) page URL's.

    You can create dynamic matching patterns or static rules for your URL's.
     
    Floyd87, Mar 21, 2011 IP
  20. webgain

    webgain Guest

    Messages:
    91
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #20
    you can keep games.html file on a folder and give name it games.
    then you can see x.com/games
     
    webgain, Mar 23, 2011 IP