0
debugger posted
String to Seo Friendly Url in php
i want to make SEO friendly url so page title also include in the page link instead of just blog post IDSuppose
i have Page Title like
Shakespeare invented the words ‘assassination’ and ‘bump’ and have Post ID :12
so instead of link http://www.fact-demon.com/index.php?post-id=12
i want link like http://www.fact-demon.com/Shakespeare-invented-the-words-assassination-and-bump/12
for Url making from String i made following code
function SeoUrl($pagetitle){
return str_replace(" ","-",$pagetitle);
}
it generate link ::
http://www.factdemon.com/Shakespeare-invented-the-words-%E2%80%98assassination%E2%80%99-and-%E2%80%98bump%E2%80%99
and by browsing it
i got error
Not found Error
Shakespeare-invented-the-words-‘assassination’-and-‘bump’ was not found on this server.
so i need proper function for String to Seo Friendly Url