Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 119518

b0gn0z on "[Plugin: WP Download Codes] file link redirects to homepage instead of download file"

$
0
0

OK!
After more mucking about, getting lost in a maelstrom of PHP voodoo I've managed to fix the problem. It has to do with having WordPress installed in a different directory than the root.
SO, all I did was change dc_template.php line 95:
$html .= '<p><a href="http://' . $_SERVER['HTTP_HOST'] . ( strpos( $_SERVER['REQUEST_URI'], '?' ) >= 0 ? substr( $_SERVER['REQUEST_URI'], 0, strpos( $_SERVER['REQUEST_URI'], '?' ) ) : $_SERVER['REQUEST_URI'] )."/home/index.php" . '?lease=' . $download_lease_id . '">' . ( $release->artist ? $release->artist . ' - ' : '' ) . $release->title . '</a> ' . format_bytes( filesize( dc_file_location() . $release->filename ) ) . '</p>';
The change being the addition of "/home/index.php" before the lease id.
So if you update /home/ to wherever your wordpress is installed hopefully it will fix your problem too.


Viewing all articles
Browse latest Browse all 119518

Trending Articles