Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Mar 2010
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to hide the extension file

    How would I hide the extension file when browsing the site? I'm trying to get mysite.com/home.html to show as mysite.com/home How would I go about doing this?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,502
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Use the filename "index.html" instead of "home.html".

    Then it will only show: mysite.com

    For all of the other pages, you could use some sort of scripting (like PHP),
    or use your .htaccess file to do a mod rewrite rule. Search Google for .htaccess

  • #3
    New Coder
    Join Date
    Mar 2010
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mlseim View Post
    Use the filename "index.html" instead of "home.html".

    Then it will only show: mysite.com

    For all of the other pages, you could use some sort of scripting (like PHP),
    or use your .htaccess file to do a mod rewrite rule. Search Google for .htaccess
    Thanks, although do you happen to know a link that will show me how to do that? I googled .htaccess and .htaccess and looked on several pages and couldn't find anything on hiding the extension file.

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,726
    Thanks
    6
    Thanked 1,013 Times in 986 Posts
    You have tosearch for “htaccess” and “Pretty URLs”. Maybe this is of help: http://net.tutsplus.com/tutorials/ot...r-pretty-urls/

  • Users who have thanked VIPStephan for this post:

    LJackson (05-01-2010)

  • #5
    New Coder
    Join Date
    Apr 2010
    Posts
    55
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Search for "URL rewriting apache"

  • #6
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,502
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    This URL:
    http://newmediarts.blogspot.com/2007...urls-with.html

    Read down about people having problems with links on their pages.
    Remove .html from your page links. I'm not sure if this is the best way to go,
    but it might be what you're looking for.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •