When generating template path from url, ignore ports and '.local' suffix...

...es

this behaviour will need some documentation too.