SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,531
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Can directory have multiple words?

    Is it okay to have a directory made up of several words?

    For example...
    Code:
    current-event
    
    case-studies
    
    in-the-news

    Debbie

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    8,900
    Mentioned
    138 Post(s)
    Tagged
    2 Thread(s)
    Sure, why not? And what happened when you tried?
    Rémon - Hosting Advisor

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  3. #3
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,605
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    Debbie,

    Now, that surprises me coming from you as I know that you know better! For everyone else, Sir Tim Berners-Lee's treatise on URI syntax is a geek's guide to allowable characters (and, Deb, a space in a directory name would NOT be allowed - unless it's encoded as %20): http://www.ietf.org/rfc/rfc2396.txt.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  4. #4
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,531
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    Debbie,

    Now, that surprises me coming from you as I know that you know better! For everyone else, Sir Tim Berners-Lee's treatise on URI syntax is a geek's guide to allowable characters (and, Deb, a space in a directory name would NOT be allowed - unless it's encoded as %20): http://www.ietf.org/rfc/rfc2396.txt.

    Regards,

    DK
    Well, I know it is okay - and preferred - to use hyphens in file names (e.g. "postage-meters-can-save-you-money.php") but I did not know whether that same logic was acceptable for directory names?!


    So it sounds like a URL like this would both be acceptable and good for SEO purposes...
    Code:
    www.mysite.com/articles/small-business/postage-meters-can-save-you-money.php
    Right?

    Thanks,


    Debbie

  5. #5
    Non-Member Max Height's Avatar
    Join Date
    Dec 2011
    Posts
    303
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    Right?
    I can't think of a reason why it wouldn't be

    Like ScallioXTX asked:
    Sure, why not? And what happened when you tried?

  6. #6
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,605
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    DD,

    Personally, I prefer underscores (_'s) rather than hyphens (-'s) because the words stand out more. As a mod_rewrite user, it's also easier to deal with _'s than -'s.

    Did you bother to read the Berners-Lee article? It's techno-geek but very enlightening (at least for those with problems putting :'s, etc, in a URI).

    Then, I'll add my echo of Rémon's query about what happened when you tried 'odd' directory names.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  7. #7
    Mouse catcher silver trophy
    Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,830
    Mentioned
    111 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by dklynn View Post
    Personally, I prefer underscores (_'s) rather than hyphens (-'s) because the words stand out more. As a mod_rewrite user, it's also easier to deal with _'s than -'s.
    The downside of underscores is the human element - when people are typing a URL in. It's much easier to see the word delimiter in domain.com/multiple-words than domain.com/multiple_words, and it's easier to get people to type a dash than an underscore as well.

  8. #8
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,605
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    Stevie,

    True - if you're relying on visitors typing in the URI. However, in the world of mod_rewrite, hyphens do occur naturally and using them to replace spaces makes a horrible mess of redirections. It's a personal preference and there's a downside to either depending largely what the needs are, i.e. links vs typos and mod_rewrite redirections vs no redirections. I'm sure that others will find other reasons for one or the other - which might make for an interesting thread.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  9. #9
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,531
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    DD,

    Personally, I prefer underscores (_'s) rather than hyphens (-'s) because the words stand out more. As a mod_rewrite user, it's also easier to deal with _'s than -'s.
    Except Google prefers hyphens... (At least for file names.)


    Did you bother to read the Berners-Lee article? It's techno-geek but very enlightening (at least for those with problems putting :'s, etc, in a URI).
    It is 40 pages, so no. But I did skim the section on valid characters. And I did PDF it and put it in my "References" folder for later reading.


    Then, I'll add my echo of Rémon's query about what happened when you tried 'odd' directory names.

    Regards,

    DK
    I didn't notice any issues with hyphens in directory names, but that doesn't mean you'd want to do that.


    Debbie


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
  •