Lester Chan's Forums

Please login or register.

Login with username, password and session length
Pages: [1] 2 3   Go Down

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

0 Members and 1 Guest are viewing this topic.

jlm

  • Newbie
  • *
  • Offline Offline
  • 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
Logged

jlm

  • Newbie
  • *
  • Offline Offline
  • 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
Logged

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Offline Offline
  • Posts: 10,040
    • View Profile
    • WWW
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
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
Logged

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Offline Offline
  • Posts: 10,040
    • View Profile
    • WWW
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.
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
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
Logged

Ttech

  • Official Support
  • Global Moderator
  • *****
  • Offline Offline
  • Posts: 4,294
    • View Profile
    • WWW
Re: Downloads redirect to 404 page
« Reply #6 on: 26 July 2007, 00:41 »
Ok. :) Glad it works... :)
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
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
Logged

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Offline Offline
  • Posts: 10,040
    • View Profile
    • WWW
Re: Downloads redirect to 404 page
« Reply #8 on: 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
  • Global Moderator
  • *****
  • Offline Offline
  • Posts: 4,294
    • View Profile
    • WWW
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?
Logged
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Offline Offline
  • Posts: 10,040
    • View Profile
    • WWW
Re: Downloads redirect to 404 page
« Reply #10 on: 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
  • Global Moderator
  • *****
  • Offline Offline
  • Posts: 4,294
    • View Profile
    • WWW
Re: Downloads redirect to 404 page
« Reply #11 on: 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: 66
    • View Profile
    • WWW
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
Logged
Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.6
WordPress 2.6.2 moving to 2.7

Ttech

  • Official Support
  • Global Moderator
  • *****
  • Offline Offline
  • Posts: 4,294
    • View Profile
    • WWW
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! :)
Logged
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

David Potter

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 66
    • View Profile
    • WWW
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
Logged
Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.6
WordPress 2.6.2 moving to 2.7

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Offline Offline
  • Posts: 10,040
    • View Profile
    • WWW
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
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: 66
    • View Profile
    • WWW
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
Logged
Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.6
WordPress 2.6.2 moving to 2.7

David Potter

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 66
    • View Profile
    • WWW
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
Logged
Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.6
WordPress 2.6.2 moving to 2.7

Ttech

  • Official Support
  • Global Moderator
  • *****
  • Offline Offline
  • Posts: 4,294
    • View Profile
    • WWW
Re: Downloads redirect to 404 page
« Reply #18 on: 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: 66
    • View Profile
    • WWW
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
Logged
Windows Server 2003
IIS 6
MySQL 5.0.45-community-nt
PHP 5.2.6
WordPress 2.6.2 moving to 2.7
Pages: [1] 2 3   Go Up
« previous next »
 

Page created in 0.042 seconds with 25 queries.