HTML to normal.

Discussion in 'HTML & Website Design' started by davocool, Sep 2, 2009.

  1. #1
    Hey ladies and Gens,

    Can someone help me on how to get rid of .html on the end of a site.

    For example,
    I want www.domain.com/contactus.html
    to
    www.domain.com/contactus


    Help would be appreciated.

    Best Wishies,

    Davo
     
    davocool, Sep 2, 2009 IP
  2. bobjones121806

    bobjones121806 Guest

    Messages:
    1,417
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you knew a little PHP program, then I suggest that you can download a Wordpress, it can achieve what you said path.
     
    bobjones121806, Sep 2, 2009 IP
  3. davocool

    davocool Peon

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have already tried it but not working.
     
    davocool, Sep 2, 2009 IP
  4. dynashox

    dynashox Premium Member Staff

    Messages:
    8,662
    Likes Received:
    563
    Best Answers:
    3
    Trophy Points:
    335
    #4
    There is 2 way you can do here :

    1. Create a folder name 'contactus' under your domain.com. Rename your 'contactus.html' to 'index.html'. Then upload the newly rename file to 'contactus' folder.

    2. Use mod_rewrite. You need to edit your .htaccess file to this :

    
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.html -f
    RewriteRule ^(.*)$ $1.html
    
    
    Code (markup):
    - Dynashox -
     
    dynashox, Sep 2, 2009 IP
  5. bobjones121806

    bobjones121806 Guest

    Messages:
    1,417
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Do you have set up Permlink?
     
    bobjones121806, Sep 2, 2009 IP
  6. bobjones121806

    bobjones121806 Guest

    Messages:
    1,417
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Also need to create. htaccess file on your website root directory.

    .htaccess file contents:

    <verbatim>
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
    </verbatim>
     
    bobjones121806, Sep 2, 2009 IP
  7. davocool

    davocool Peon

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    i need to change to Linux server for this but i will surely try it.
    thx.
    +rep
     
    davocool, Sep 2, 2009 IP