SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist bradical1379's Avatar
    Join Date
    Feb 2007
    Posts
    442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    URL: End with trailing slash?

    When creating optimized and clean URLs, is there a "rule of thumb" for creating the URL strings? Do you end it with a trailing slash, a file extension, or however you re-wrote the URL?

    Examples:

    Trailing Slash => http://www.domain.com/example/function/
    No Trailing Slash => http://www.domain.com/example/function
    File Extension => http://www.domain.com/example/function.html

  2. #2
    SitePoint Evangelist webchalkboard's Avatar
    Join Date
    Jan 2005
    Location
    Bristol, UK
    Posts
    494
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I've created sites using all sorts of formats, but I've decided that I like the format

    http://www.domain.com/example/function

    Or better still make everything at the root level, so

    http://www.domain.com/example-function

    rewrite spaces to -

    I think that looks neat.
    Websites for Sale - Sell websites in a purpose built marketplace
    Then do some Shopping

  3. #3
    O Rly?? JakeJeck's Avatar
    Join Date
    Nov 2000
    Location
    Milwaukee
    Posts
    571
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The 3rd one is bad. People will link to your content using an extension. If you ever change technology types those extensions may change (.html -> .php) but the incoming links to your site aren't going to change. Leaving the extension off the URL resolves that problem.

  4. #4
    SitePoint Evangelist speda1's Avatar
    Join Date
    Jan 2002
    Posts
    550
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I always use the trailing slash.

    Yahoo always strips them off. Aargh.

  5. #5
    SitePoint Addict ruby-lang's Avatar
    Join Date
    Aug 2007
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    URLs with trailing slashes will perform a little better, Yahoo's opinion on them notwithstanding.


Bookmarks

Posting Permissions

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