When downloading files, never refer to a url, but always to a path, relative to the folder where your index.php is.
The reason why the file seems to be downloaded, is that CI thinks it's a new file. So, it will download it, but the file won't have any content.