GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   SEO + URL + apostrophe = ? should I encode or remove the apostrophe? (https://gfy.com/showthread.php?t=904381)

Kard63 05-08-2009 08:16 PM

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 05-08-2009 08:24 PM

I would not worry about apostrophes myself.

marketsmart 05-08-2009 08:49 PM

Quote:

Originally Posted by baddog (Post 15835908)
I would not worry about apostrophes myself.

thats why your seo will never be as strong as andre trotters... :2 cents:

baddog 05-08-2009 09:01 PM

Quote:

Originally Posted by marketsmart (Post 15835941)
thats why your seo will never be as strong as andre trotters... :2 cents:

I know, but one can dream.

fris 05-08-2009 11:52 PM

Quote:

Originally Posted by Kard63 (Post 15835898)
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

?>


wizzart 05-09-2009 01:02 AM

that is not important for SEO

CTU24 05-09-2009 01:34 AM

remove the apostrophe. and when you have traffic on the urls with apostrophe than use a 301 redirection.

nation-x 05-09-2009 04:46 AM

Quote:

Originally Posted by fris (Post 15836245)
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
?>



All times are GMT -7. The time now is 07:01 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123