<?php $url = "http://www.mydomain.com/q?filter=test"; $url= preg_replace("|^[htps]+://|", "", $url); $url= preg_replace("|^www\.|", "", $url); $url= preg_replace("|[/:\?].*$|", "", $url); echo($url);
You have javascript disabled. You will not be able to edit any code.