Inline File Extension config giving 404 Error

Hello, WP Sharks, obviously, I must be doing something wrong here, I’m trying to get the index file of my online publication to launch within the Browser as an Inline File Extension - which I would like to protect from unauthorized entry/access (of course), but it doesn’t launch at all, and keeps giving me a 404 Error page each time.

I guess my question is what configuration do I use to get this publication to open within the user’s Browser using s2Member’s protection?

What could I be doing wrong? Your help would be greatly appreciated. Please advise.

Hi Don.

You could try using the mod-rewrite linking including the s2member-file-inline parameter? WP Admin > s2Member > Download Protection > Advanced Mod-Rewrite Linkage

Let me know how it goes. :slight_smile:

Thank you for your reply, Cristian, I’ll give it a try.

1 Like

Hi, Cristian, this parameter works - thanks!, but the loading time is extremely slow (45 seconds just to load the front page) vs opening instantly when it’s outside of the s2Member framework in a standalone sub-folder. Any idea why this is happening?

Thanks again,

Don

I’m glad it worked!

When you serve a file through s2, all WordPress is being loaded. If you have many plugins, this would contribute to a slower time too.

Still, 45 secs sounds too slow…

Hmm, I see. So, there’s no work-around options to speed things up?

Hmm… Well, this will be affected directly by the speed of your WordPress, so anything you do to optimize it will also be seen here.

There is a way to prevent all other plugins from loading, which would help with the speed, but can’t be done with the current mod-rewrite implementation as it is:

There’s a file called s2member-o.php (o for only) used to serve s2’s css and js, and if you link to it with the file download query string after it, you would get the file protection too. E.g. https://yoursite.com/wp-content/plugins/s2member/s2member-o.php?s2member_file_download=book.pdf&inline=1

:slight_smile:

Thank you, Cristian, I appreciate it. Enjoy your day.

1 Like