Page 1 of 1

Remove Subdomain from url

Posted: Tue Aug 17, 2010 8:33 pm
by greendezine
Does anyone know how to first get the current URL (which always contains a subdomain) then remove the subdomain and print the result?

For Example, turn this:
<a href ="http://shop.mydomain.com/subdirectory">Link</a>

into this:
<a href ="http://mydomain.com/subdirectory">Link</a>