Download link resulting in 'Page Not Found'

Permalink
I have been working on a custom button generator and have reached the point at which I am adding the 'file download' capability.

I am running a staging version of my site in which I develop the elements and test them before pushing them live.

The problem is that, on the staging site, the button works, yet on the live site the button results in a 'Page not found'. The URLs are essentially exactly the same, save for the numbers at the end;

'http://www.domain.co.uk/concrete5/index.php/download_file/331/1'

There cannot be a problem with the block as it works perfectly on my staging site. I've included the applicable bits of code below just in case.

Add.php
<div id="tabDownload" class="tab">
<?php 
    $file = Loader::helper('concrete/asset_library');
    echo $file->file('urlFile','fID',t('Choose the file'));
?>
</div>


Controller.php:-
function view(){
    $c = Page::getCurrentPage();
    $cID = $c->getCollectionID();
    $url = View::url('/download_file',$this->fID,$cID);
    $this->set('urlFull', $url);
}


View.php
<a href="<?php print $urlFull; ?>" />Link</a>

shooftie
 
teknojunkey replied on at Permalink Reply
teknojunkey
i have found that sometimes ( some ) links are stored with the directory they were created in.

I have never checked or tested where these are occurring but when i move a site i sometimes have to check the database for

/builddirectory/index.php/...

i just use find and replace in a text editor to remove these oddities.
shooftie replied on at Permalink Reply
shooftie
Sorry, I'm not sure that I understand.

Are you suggesting that I search and replace my database? I've never done this, I try to stay as clear as I can from the database from previous experience.

Because the URL is not saved in the database, instead it simply builds the URL on request from the file ID, could it be that you mean me to search and replace the file manager table?

I'm sorry if I'm not making sense, this is an area that I'm not completely comfortable in just yet.