How to change .html URLs?

Discussion in 'HTML & Website Design' started by Dave E, Oct 1, 2007.

  1. #1
    All of the URLs on my site have .html on the end (domain.com/page.html), does anyone know how to change them so they are just like this: domain.com/page/
     
    Dave E, Oct 1, 2007 IP
  2. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #2
    Yes, you can do this with .htaccess I think. Search the .htaccess sub forum in Site and Server Administration

    BP
     
    blueparukia, Oct 1, 2007 IP
  3. Dsgnr

    Dsgnr Active Member

    Messages:
    65
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #3
    You need .htaccess URL Rewrite.
     
    Dsgnr, Oct 1, 2007 IP
  4. Camay123

    Camay123 Well-Known Member

    Messages:
    3,423
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    160
    #4
    Camay123, Oct 1, 2007 IP
  5. Argo

    Argo Guest

    Messages:
    66
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    damn i was going to say that hehehe.. yeah i found out that you can do it through .htaccess rewrite... But hey i probably should have asked on here.
     
    Argo, Oct 1, 2007 IP
  6. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #6
    This is assuming you are using a webserver that supports .htaccess and rewrite. If you are running IIS (Microsofts web server) then it is more difficult to do with .HTML files - something microsoft really need to fix
     
    AstarothSolutions, Oct 2, 2007 IP
  7. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #7
    You do not need URL rewriting to the few who suggested it.

    It is just a matter of adding this line to .htaccess :
    AddType application/x-httpd-php .php .html .htm
    Code (markup):
    Astaroth, what difficulty? In setting up something like isapi_rewrite?
     
    krt, Oct 2, 2007 IP
  8. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #8
    On the basis that many shared webhosts dont give their users access to tools like isapi_rewrite
     
    AstarothSolutions, Oct 2, 2007 IP
  9. voucher4sell

    voucher4sell Banned

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    thanks you . i will do this with my file .htm
     
    voucher4sell, Oct 2, 2007 IP
  10. boyponga

    boyponga Banned

    Messages:
    1,013
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #10
    use .htaccess and learn modrewrite to rewrite URLs.
     
    boyponga, Oct 2, 2007 IP
  11. jred2002

    jred2002 Well-Known Member

    Messages:
    160
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #11
    It's easy on a widows server too -
    Go into IIS, click on the properties for your website. Under "Documents" check the "Enable Default Document" checkbox and write whatever files you would like in the box.
     
    jred2002, Oct 2, 2007 IP
  12. dancom96

    dancom96 Well-Known Member

    Messages:
    1,556
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    105
    #12
    Or make a folder as
    domain.com/whatever
    And put whatever you want in it, as index.html
    Either that or .htaccess
     
    dancom96, Oct 2, 2007 IP
  13. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #13
    Huh?

    Doesn't that just make it so .php, .html, and .htm files parse php? Not what he's asking for? Or could I be wrong?
     
    soulscratch, Oct 2, 2007 IP
  14. sammas47

    sammas47 Peon

    Messages:
    80
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    but then I think you will lose all your trafic. Any link having an .html extension will not be accessible hence forth, right?
     
    sammas47, Oct 2, 2007 IP