Req: How to Change .htm to .name?

Discussion in 'Apache' started by phoenixbkn, May 14, 2009.

  1. #1
    Hi all i want to change my webpage name .htm to .name like index.pga

    How to i change
     
    phoenixbkn, May 14, 2009 IP
  2. Lpe04

    Lpe04 Peon

    Messages:
    579
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    How are you building the pages?
     
    Lpe04, May 15, 2009 IP
  3. E-IndiaWeb

    E-IndiaWeb Well-Known Member

    Messages:
    467
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Copy the coding below and paste it on your .htaccess file.

    If you now open something.pga it will call something.htm from your server.
     
    E-IndiaWeb, May 15, 2009 IP
  4. Lpe04

    Lpe04 Peon

    Messages:
    579
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The reason I asked is there are different ways to do it, especially depending on how you are creating the pages
     
    Lpe04, May 15, 2009 IP
  5. phoenixbkn

    phoenixbkn Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Its not working

    http://phoenixbkn.com/text.pga
    Code (markup):
    Result:
     
    phoenixbkn, May 15, 2009 IP
  6. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #6
    For it to work u need mod rewrite enabled on your server
     
    Bohra, May 16, 2009 IP
  7. Lpe04

    Lpe04 Peon

    Messages:
    579
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Modrewrite is not necessarily the best or easiest way to solve this, but you haven't informed as to how you are creating the pages.
    You can also set Handlers in Apache to handle certain extensions, probably the easiest way.
     
    Lpe04, May 16, 2009 IP
  8. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #8
    With .htaccess u can make .pga extension work as html but then u will have to change the extensions of all the .html files manually
     
    Bohra, May 16, 2009 IP
  9. Lpe04

    Lpe04 Peon

    Messages:
    579
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Also, if you have a certain CMS, changing the extension won't be so easy
     
    Lpe04, May 16, 2009 IP