Generating search engine friendly (SEF) URLs can dramatically improve your search engine results. There's a big difference between "/post.php?id=2382" and "/great-php-functions/". Having search engine friendly URLs also gives the user an idea of what will be on the page they are clicking on if the link text isn't adequate.
I've created sister PHP functions to generate search engine friendly URLs for the CMS' I create for my customers. The idea is fairly simple. I take the user-created page title and feed it to a scrubbing function to:
- remove all punctuation
- switch the URL to lowercase
- remove spaces, replace with a given delimiter (in this case, a dash)
- remove duplicate words
- remove words that aren't helpful to SEO
The function accepts four values:
- $input - string - will be SEO'd, in my case, the page title
- $replace - string - the word separator, in most cases a dash or underscore
- $remove_words - boolean - remove specific, non-helpful SEO words
- $words_array - array - an array of words that should be removed from every URL because they aren't helpful to SEO
Do yourself a favor -- make your dynamic pages more search engine friendly with clean URLs!