SEO + URL + apostrophe = ? should I encode or remove the apostrophe?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kard63
    Confirmed User
    • Nov 2003
    • 8944

    #1

    SEO + URL + apostrophe = ? should I encode or remove the apostrophe?

    If some half ass weak non-porn seo term has an apostrophe in it and I'm using it in the URL should I encode so that I can use the ' or should I just remove it from the URL?
  • baddog
    So Fucking Banned
    • Apr 2001
    • 107089

    #2
    I would not worry about apostrophes myself.

    Comment

    • marketsmart
      HOMICIDAL TROLL KILLER
      • Dec 2004
      • 20419

      #3
      Originally posted by baddog
      I would not worry about apostrophes myself.
      thats why your seo will never be as strong as andre trotters...

      Comment

      • baddog
        So Fucking Banned
        • Apr 2001
        • 107089

        #4
        Originally posted by marketsmart
        thats why your seo will never be as strong as andre trotters...
        I know, but one can dream.

        Comment

        • fris
          I have to go potty
          • Aug 2002
          • 55818

          #5
          Originally posted by Kard63
          If some half ass weak non-porn seo term has an apostrophe in it and I'm using it in the URL should I encode so that I can use the ' or should I just remove it from the URL?
          remove it.

          Code:
          <?php
          
          function cleanURL($string)
          {
          $url = str_replace("'", '', $string);
          $url = str_replace('%20', ' ', $url);
          $url = preg_replace('~[^\\pL0-9_]+~u', '-', $url); // substitutes anything but letters, numbers and '_' with separator
          $url = trim($url, "-");
          $url = iconv("utf-8", "us-ascii//TRANSLIT", $url);// you may opt for your own custom character map for encoding.
          $url = strtolower($url);
          $url = preg_replace('~[^-a-z0-9_]+~', '', $url); // keep only letters, numbers, '_' and separator
          return $url;
          }
          
          // echo cleanURL("Shelly's%20Greatest%20Poem%20(2008)");  // shellys-greatest-poem-2008
          
          ?>
          Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


          My Newest Theme

          Comment

          • wizzart
            scriptmaster
            • May 2006
            • 5246

            #6
            that is not important for SEO
            BimboZone

            Comment

            • CTU24
              Registered User
              • May 2009
              • 15

              #7
              remove the apostrophe. and when you have traffic on the urls with apostrophe than use a 301 redirection.
              ------------------------------------------------
              SEO is sexy ;-)

              Comment

              • nation-x
                Confirmed User
                • Mar 2004
                • 5370

                #8
                Originally posted by fris
                remove it.

                Code:
                <?php
                
                function cleanURL($string)
                {
                $url = str_replace("'", '', $string);
                $url = str_replace('%20', ' ', $url);
                $url = preg_replace('~[^\\pL0-9_]+~u', '-', $url); // substitutes anything but letters, numbers and '_' with separator
                $url = trim($url, "-");
                $url = iconv("utf-8", "us-ascii//TRANSLIT", $url);// you may opt for your own custom character map for encoding.
                $url = strtolower($url);
                $url = preg_replace('~[^-a-z0-9_]+~', '', $url); // keep only letters, numbers, '_' and separator
                return $url;
                }
                
                // echo cleanURL("Shelly's%20Greatest%20Poem%20(2008)");  // shellys-greatest-poem-2008
                
                ?>
                wtf is that mess?
                Code:
                <?php
                function cleanURL($url, $seperator = '-') {
                    $url = ereg_replace("[^[:alnum:][:space:]]", "", $url); //remove all but numbers. letters and spaces
                    $url = str_replace('  ', ' ', $url ); //replace and double spaces with a single space
                    $url = strtolower(str_replace(' ', $seperator, $url)); //replace spaces with seperator
                    return $url
                }
                
                // echo cleanURL(urldecode("Shelly's%20Greatest%20Poem%20(2008)"));  // shellys-greatest-poem-2008
                
                // echo cleanURL("Shelly's Greatest  Poem (2008)");  // shellys-greatest-poem-2008
                ?>

                Comment

                Working...