Remove Subdomain from url
Posted: Tue Aug 17, 2010 8:33 pm
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>
For Example, turn this:
<a href ="http://shop.mydomain.com/subdirectory">Link</a>
into this:
<a href ="http://mydomain.com/subdirectory">Link</a>