All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.


Author Topic: Downloads redirect to 404 page  (Read 27896 times)

0 Members and 1 Guest are viewing this topic.

Offline jlm

  • Newbie
  • *
  • Posts: 8
    • View Profile
Downloads redirect to 404 page
« on: 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

Offline jlm

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Downloads redirect to 404 page
« Reply #1 on: 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: [Select]
<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: [Select]
<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

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline jlm

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Downloads redirect to 404 page
« Reply #3 on: 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

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Downloads redirect to 404 page
« Reply #4 on: 25 July 2007, 17:49 »
thanks for contributing the solution

EDIT: I have created a sticky on it.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline bulletbrain

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Downloads redirect to 404 page
« Reply #5 on: 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) :-[

However, instead of using something like:
Code: [Select]
href="http://www.mysite.com/wordpress/?dl_id=%FILE_ID%"I just used
Code: [Select]
href="?dl_id=%FILE_ID%" and all now works fine  ;D

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,294
    • View Profile
Re: Downloads redirect to 404 page
« Reply #6 on: 26 July 2007, 00:41 »
Ok. :) Glad it works... :)
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline cmm225

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Downloads redirect to 404 page
« Reply #7 on: 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: [Select]
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

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Downloads redirect to 404 page
« Reply #8 on: 02 September 2007, 09:25 »
cool, thanks for sharing

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,294
    • View Profile
Re: Downloads redirect to 404 page
« Reply #9 on: 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?
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Downloads redirect to 404 page
« Reply #10 on: 03 September 2007, 17:06 »
eh, no idea man

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,294
    • View Profile
Re: Downloads redirect to 404 page
« Reply #11 on: 05 September 2007, 00:05 »
Hmm... Thanks
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline David Potter

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Downloads redirect to 404 page
« Reply #12 on: 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: [Select]
/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
Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.6
WordPress 2.6.2 moving to 2.7

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,294
    • View Profile
Re: Downloads redirect to 404 page
« Reply #13 on: 01 October 2007, 19:15 »
Perfect Timing!
   I just finished looking over this plugin. :)

  Here is your problem. :)
   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. :) Really helpful! Good... No Great idea! :)
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline David Potter

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Downloads redirect to 404 page
« Reply #14 on: 01 October 2007, 19:24 »
Thanks ;D

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
Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.6
WordPress 2.6.2 moving to 2.7

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Downloads redirect to 404 page
« Reply #15 on: 01 October 2007, 19:46 »
does "index.php/downloads" works for you? because it works for me on Linux

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline David Potter

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Downloads redirect to 404 page
« Reply #16 on: 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
Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.6
WordPress 2.6.2 moving to 2.7

Offline David Potter

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Downloads redirect to 404 page
« Reply #17 on: 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
Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.6
WordPress 2.6.2 moving to 2.7

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,294
    • View Profile
Re: Downloads redirect to 404 page
« Reply #18 on: 01 October 2007, 20:24 »
Hmm... I don't know...  But it did work?
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Offline David Potter

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Downloads redirect to 404 page
« Reply #19 on: 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
Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.6
WordPress 2.6.2 moving to 2.7