Lester Chan's Forums
07 September 2008, 13:57 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Lester Chan’s WordPress Plugins July 2008 Update
 
   Home   Help Search Login Register  
Pages: [1] 2 3   Go Down
  Print  
Author Topic: Downloads redirect to 404 page  (Read 15385 times)
0 Members and 1 Guest are viewing this topic.
jlm
Newbie
*
Offline Offline

Posts: 8


View Profile
« Topic Start: 25 July 2007, 15:24 »

Hi,

I installed the plugin at romanticminute.com/wordrpess. Here is my first download:

http://www.romanticminute.com/wordpress/love-coupons-set-1/

Here is my downloads page:

http://www.romanticminute.com/wordpress/downloads

All of the links redirect to a 404 page.

I was wondering if you might take a look or provide some guidance. Thanks so much!

Jackie
Logged
jlm
Newbie
*
Offline Offline

Posts: 8


View Profile
« Reply #1: 25 July 2007, 17:12 »

Hi,

I fixed this so that it would work with the nice Permalinks.  I updated the templates:

Download Listing Template:

Code:
<p><img src="http://www.romanticminute.com/wordpress/wp-content/plugins/downloadmanager/images/drive_go.gif" alt="Download: %FILE_NAME%" title="Download: %FILE_NAME%" style="vertical-align: middle;" />&nbsp;&nbsp;<strong><a href="http://www.romanticminute.com/wordpress/?dl_id=%FILE_ID%" title="Download: %FILE_NAME%">%FILE_NAME%</a></strong><br /><strong>&raquo; %FILE_SIZE% - %FILE_HITS% hits - %FILE_DATE%</strong><br />%FILE_DESCRIPTION%</p>


Download Embedded Template

Code:
<p><img src="http://www.romanticminute.com/wordpress/wp-content/plugins/downloadmanager/images/drive_go.gif" alt="Download: %FILE_NAME%" title="Download: %FILE_NAME%" style="vertical-align: middle;" />&nbsp;&nbsp;<strong><a href="http://www.romanticminute.com/wordpress/?dl_id=%FILE_ID%" title="Download: %FILE_NAME%">%FILE_NAME%</a></strong> (%FILE_SIZE%, %FILE_HITS% hits)</p>

Everything seems to be working now. Thanks!

Jackie
Logged
GaMerZ
lesterchan.net
Administrator
*****
Offline Offline

Posts: 7,089



View Profile WWW
« Reply #2: 25 July 2007, 17:15 »

This might help you http://forums.lesterchan.net/index.php/topic,764.40/p,43.html
Logged


++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.
jlm
Newbie
*
Offline Offline

Posts: 8


View Profile
« Reply #3: 25 July 2007, 17:48 »

Thanks. I read that. I am using PHP version 5.2.0. I think it has to do with the permalink structure I'm using: /%postname%/.

The above code I posted is working just find, so I'll use that.

Thanks for the reply and great plugins.

Jackie
Logged
GaMerZ
lesterchan.net
Administrator
*****
Offline Offline

Posts: 7,089



View Profile WWW
« Reply #4: 25 July 2007, 17:49 »

thanks for contributing the solution

EDIT: I have created a sticky on it.
Logged


++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.
bulletbrain
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #5: 25 July 2007, 22:05 »

Thanks for that, I was thinking far too much about wordpress and WP-DownloadManager coding/permalinks and forgot the now obvious easy template route (couldn't see the wood for the trees) Embarrassed

However, instead of using something like:
Code:
href="http://www.mysite.com/wordpress/?dl_id=%FILE_ID%"
I just used
Code:
href="?dl_id=%FILE_ID%"
and all now works fine  Grin
Logged
Ttech
Official Support
Administrator
*****
Offline Offline

Posts: 4,290



View Profile WWW
« Reply #6: 26 July 2007, 00:41 »

Ok. Smiley Glad it works... Smiley
Logged

Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers
cmm225
Newbie
*
Offline Offline

Posts: 9


View Profile
« Reply #7: 01 September 2007, 23:34 »

Yea, I got this problem as well.

However, since I still wanted prettier URLS, I changed my .htaccess to

Code:
RewriteEngine on
RewriteRule dl-([0-9]*) ?dl_id=$1 [NC]

And changed my links from ?dl_id=%FILE_ID% to dl-%FILE_ID%

and now it works like http://mysite.com/dl-1


I've tried a couple other combinations, which don't work, link /dl/1, or at least I couldn't get them to work.

but, I like http://mysite.com/dl-1
Logged
GaMerZ
lesterchan.net
Administrator
*****
Offline Offline

Posts: 7,089



View Profile WWW
« Reply #8: 02 September 2007, 09:25 »

cool, thanks for sharing
Logged


++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.
Ttech
Official Support
Administrator
*****
Offline Offline

Posts: 4,290



View Profile WWW
« Reply #9: 03 September 2007, 16:21 »

Ny sytem is just aobut up! I just need to restor my Thunberbird and Firefox Profiles and settings. Then Install Apache and PHP. GaMerZ do you know how to set up Perl and Python properly?
Logged

Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers
GaMerZ
lesterchan.net
Administrator
*****
Offline Offline

Posts: 7,089



View Profile WWW
« Reply #10: 03 September 2007, 17:06 »

eh, no idea man
Logged


++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.
Ttech
Official Support
Administrator
*****
Offline Offline

Posts: 4,290



View Profile WWW
« Reply #11: 05 September 2007, 00:05 »

Hmm... Thanks
Logged

Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers
David Potter
Jr. Member
**
Offline Offline

Posts: 51



View Profile WWW
« Reply #12: 01 October 2007, 18:06 »

This solved the problem for downloads, but I still get the 404 redirects for category pages (e.g. http://david.blogs.dpotter.net/Technical/downloads/?dl_cat=2).  I have PermaLinks set to date and name based, which sets it to this:

Code:
/index.php/%year%/%monthnum%/%day%/%postname%/

You can see my download page here:  http://david.blogs.dpotter.net/Technical/index.php/downloads/

Has anyone figured out how to solve this problem for category pages?

In case it makes a difference, I'm running WordPress 2.2.3 on this blog.

Thanks,
David
Logged

Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.4
WordPress 2.6
Ttech
Official Support
Administrator
*****
Offline Offline

Posts: 4,290



View Profile WWW
« Reply #13: 01 October 2007, 19:15 »

Perfect Timing!
   I just finished looking over this plugin. Smiley

  Here is your problem. Smiley
   The link you gave me for your downloads page has "index.php" in it. But the category for your downloads page does not have index.php in it.So something is happening to your permalinks causing it to not add the index.php, making it break. Perhaps maybe try removing /index.php and regenerating permalinks. See if it works then.

BTW: I like the Information in your Profile. Smiley Really helpful! Good... No Great idea! Smiley
Logged

Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers
David Potter
Jr. Member
**
Offline Offline

Posts: 51



View Profile WWW
« Reply #14: 01 October 2007, 19:24 »

Thanks Grin

When I remove index.php from my permalink structure, I can no longer get to any page.  Looking at it from a web server standpoint, this makes sense, since there isn't a folder at http://david.blogs.dpotter.net/Technical/downloads.  The only way I can see for this to work (with my limited experience with WordPress) is to get index.php added to the category page URL.  Can that be done?

Thanks,
David
Logged

Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.4
WordPress 2.6
GaMerZ
lesterchan.net
Administrator
*****
Offline Offline

Posts: 7,089



View Profile WWW
« Reply #15: 01 October 2007, 19:46 »

does "index.php/downloads" works for you? because it works for me on Linux
Logged


++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.
David Potter
Jr. Member
**
Offline Offline

Posts: 51



View Profile WWW
« Reply #16: 01 October 2007, 19:51 »

Alright, I'm an idiot.  I didn't notice that there was a place on the Download Options page for me to specify the URL for the downloads page.  Adding index.php/ before downloads did the trick.  Thanks for the help.

By the way, the comment below the downloads page URL text control says that it should be specified without a trailing slash.  I didn't touch it until now and it had a trailing slash.  It seems to work fine with or without one.

Thanks,
David
Logged

Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.4
WordPress 2.6
David Potter
Jr. Member
**
Offline Offline

Posts: 51



View Profile WWW
« Reply #17: 01 October 2007, 20:13 »

Hmm, as I examine this further, it seems odd to me that the index.php wasn't there to begin with.  How is the default downloads page URL generated?  I wonder if the other problem discussed in this thread could be solved if the downloads page URL was fixed by default.

I decided to revert my download listing template to the default where it uses %FILE_DOWNLOAD_URL%.  It doesn't have the index.php in it either.  Any idea why?

Thanks,
David
Logged

Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.4
WordPress 2.6
Ttech
Official Support
Administrator
*****
Offline Offline

Posts: 4,290



View Profile WWW
« Reply #18: 01 October 2007, 20:24 »

Hmm... I don't know...  But it did work?
Logged

Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers
David Potter
Jr. Member
**
Offline Offline

Posts: 51



View Profile WWW
« Reply #19: 01 October 2007, 20:47 »

Yep, it works if I specify this for the down link:  "?dl_id=%FILE_ID%"
This produces a link that looks like ths:  http://david.blogs.dpotter.net/Technical/index.php/downloads/?dl_id=1

It does not work when I specify this (which is from the default template):  "%FILE_DOWNLOAD_URL%"
This produces a link that looks like this:  http://david.blogs.dpotter.net/Technical/download/1/

I like the second URL, but it sends you to a 404 page.  It just seems odd to me that the FILE_DOWNLOAD_URL contains an URL that doesn't work.  I'm sure you spent a bunch of time testing it so it makes me wonder what's different about my configuration.  By the way, I tried the /download/1/ link with index.php inserted before it (http://david.blogs.dpotter.net/Technical/index.php/download/1/) and it just took me to my home page.

Thanks,
David
Logged

Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.4
WordPress 2.6
Pages: [1] 2 3   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.086 seconds with 24 queries.