latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

download restrictions getting 404

Home Forums Community Forum download restrictions getting 404

This topic contains 4 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 3 months ago.

Topic Author Topic
Posted: Monday Sep 17th, 2012 at 1:29 pm #25589

posted earlier in the community form here, before I was a paying customer ;-)

http://www.s2member.com/forums/topic/download-restrictions-getting-404/

Any thoughts?

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Tuesday Sep 18th, 2012 at 2:01 am #25666

Hi Matthew.

But I get a custom 404 error when I click the link:
404: Sorry, file not found. Please contact Support for assistance.

Is your file here? /wp-content/plugins/s2member-files/test-document.docx

PLEASE NOTE: This is a windows 2008 R2 server so the .htaccess code, if relevant, needs to be ported.

I’m not sure if mod_rewrite rules work in Windows servers, but I don’t think it matters here because you’re using the querystring to get to the file, not a rewrite.

Posted: Wednesday Sep 19th, 2012 at 2:32 pm #25838

Thanks Cristian. I did have the file placed in the wrong location, but I since moved it to the correct location and am still getting the 404 error. I now have two test files:

A PDF at http://www.newname.me/wp-content/plugins/s2member-files/test3.pdf

and a corresponding word doc at http://www.newname.me/wp-content/plugins/s2member-files/test3.docx

I can retrieve each of them by visiting the URLs directly, but I cannot get them to download when using these links:

http://www.newname.me/?s2member_file_download=test3.pdf
http://www.newname.me/?s2member_file_download=test3.docx

Does s2Member use cURL or FOPEN and could there be problems with that on Win Server 2008 R2? Do I need to configure PHP somehow?

Thanks,
Matt

Posted: Wednesday Sep 19th, 2012 at 2:34 pm #25839

Also, please note: You may not be able to see files at the URLs directly by the time you read this because I am having trouble with my SVN deleting them with every update. But trust me, I just verified I can get to them myself at this time.

Thanks,
Matt

Posted: Thursday Sep 20th, 2012 at 7:23 am #25910

I see.

If you log out of your account, can you still download the protected files? I just tried the full URL to it and was allowed to download. If you can while logged out, then the .htaccess for the s2member-files dir is probably not working. Like I said before, I don’t know if mod_rewrite (or .htaccess) works in a Win server.

Just to discard the possibility of another plugin interfering, could you deactivate the other plugins and test downloading the protected file again? I find it odd that the query string version doesn’t work, but maybe it’s another sympton of the Win server? I don’t know…

I’d also test using the Amazon S3 integration to host the protected files, in case you can’t make it work with the files in your site’s hosting account.

Viewing 4 replies - 1 through 4 (of 4 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.