- Forums
- Scripts
- How To Make Url Search Engine Friendly Making Urls Clean SEO
This Page Contains information about How To Make Url Search Engine Friendly Making Urls Clean SEO By wallpaperama in category Scripts with 6 Replies. [1331], Last Updated: Sat May 18, 2024
wallpaperama
Thu Feb 21, 2008
6 Comments
1055 Visits
i frequently use this function to make mod rewrite urls, it removes special charracters from url so it can be seo friendly
function clean_url($text)
{
#### FUNCTION BY WWW.WEBUNE.COM AND WALLPAPERAMA.COM
## PLEASE DO NOT REMOVE THIS.. THANK YOU
$text=strtolower($text);
$code_entities_match = array( '"' ,'!' ,'@' ,'#' ,'$' ,'%' ,'^' ,'&' ,'*' ,'(' ,')' ,'+' ,'{' ,'}' ,'|' ,':' ,'"' ,'<' ,'>' ,'?' ,'[' ,']' ,'' ,';' ,"'" ,',' ,'.' ,'_' ,'/' ,'*' ,'+' ,'~' ,'`' ,'=' ,' ' ,'---' ,'--','--');
$code_entities_replace = array('' ,'-' ,'-' ,'' ,'' ,'' ,'-' ,'-' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'-' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'-' ,'' ,'-' ,'-' ,'' ,'' ,'' ,'' ,'' ,'-' ,'-' ,'-','-');
$text = str_replace($code_entities_match, $code_entities_replace, $text);
return $text;
}