I've built a function that basically links an excerpt to its relative post. In order to do that I have figured that the variable $_SERVER['SERVER_NAME']
could come in handy in building the path.
I don't know if this is due to the fact I am testing the page on a local environment, but on my local machine the path I have is like http://localhost/webdir/localhost/index.php?p=3
localhost
is repeated twice. What could possibly cause this?