SEO Friendly Links using PHP


This code removes all special characters from the given URL and make it SEO friendly.

function makeMyUrlFriendly($url){
$output = preg_replace("/\s+/" , "_" , trim($url));
$output = preg_replace("/\W+/" , "" , $output);
$output = preg_replace("/_/" , "-" , $output);
return strtolower($output);
I do not use cookies on this website

🍪🍪 What cookies?

Your privacy is important. That's why this website doesn't track visitors with fingerprinting, your IP address or cookies.

Web analytics data is your own. Reclaim it.

Gain back control with a privacy-focused web analytics platform (using a cookie-less architecture) from: Data Centurion.