Made so static resources URI are registered only if port is not added.