Almost done with my permalink but please help

Discussion in 'PHP' started by TheSyndicate, Apr 20, 2009.

  1. #1
    Now i got a permalink that looks like this


    domain/company-15-United%20States-Business%20Law-Greines,%20Martin,%20Stein%20&%20Richland%20LLP.html


    Well if you post it in a brower i do not google will pick it up.

    Should i seperate each section with a / and every %20 with a - ?
     
    TheSyndicate, Apr 20, 2009 IP
  2. Friendzzz

    Friendzzz Banned

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Replace %20 with - thats a good practise
     
    Friendzzz, Apr 20, 2009 IP
  3. TheSyndicate

    TheSyndicate Prominent Member

    Messages:
    5,410
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    365
    #3
    it will be a loads of - should i seperate it with / ?
     
    TheSyndicate, Apr 20, 2009 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    Personally I prefer using "_" for spaces, so that eventual "-" will stand out as actual hyphens. And yes, some delimiting into subfolders "/" would probably not hurt, but it isn't strictly necessary. If, however, the format of the URL is always the same (ie. you have certain parts that does not change), I would separate those parts with "/".
     
    PoPSiCLe, Apr 20, 2009 IP
    TheSyndicate likes this.
  5. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you use / to separate parts of the URL, you will have to make sure all your internal links (including css and images) are absolute instead of relative, which makes your site/pages less portable.
     
    SmallPotatoes, Apr 20, 2009 IP
  6. TheSyndicate

    TheSyndicate Prominent Member

    Messages:
    5,410
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    365
    #6
    tack skall du ha (than you very much) i will try it

    I try the / and it change my website it is not wordpress blog it is a website.
     
    TheSyndicate, Apr 21, 2009 IP
  7. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #7
    No, keep using the "-" sign as it does not do any harm to the links. Using "/" slashes in the titles is a bad idea though. Regardless on the rewrite engine that your script is using, they will most probably be replaced with %% kind of characters.
     
    Clive, Apr 28, 2009 IP
  8. TheSyndicate

    TheSyndicate Prominent Member

    Messages:
    5,410
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    365
    #8
    why you say that? You mean test/test/test is bad?
     
    TheSyndicate, Apr 28, 2009 IP
  9. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #9
    No, not that. name.com/sub/sub/sub-category is fine, I was just referring to your other thought:
    Well, going back to the original post, "%20" is the URL encoded representation for spaces in titles. I guess that's how your rewrite engine treats the matter, although most systems will automatically replace spaces with "-" in url's by default as far as I know.
     
    Clive, Apr 28, 2009 IP