Thanks for your inquiry. ~ We appreciate your patience :-)
Does that means that it works just for php files?
What about html files?
It works only with PHP files. However, ANY file can (even HTML files) be configured to parse PHP tags. Most servers are configured to parse PHP tags inside .php files only. However, a quick addition to your .htaccess file can add support for PHP tags inside other files, which would otherwise be served statically.
Here are some articles covering this topic for GoDaddy, MediaTemple (gs) and HostGator.
On GoDaddy, add this to your .htaccess file.
AddHandler x-httpd-php5 .html
On HostGator, add this to your .htaccess file.
AddType application/x-httpd-php5 .html
On MediaTemple (gs), add this to your .htaccess file.
AddHandler php-script .html
You will need to consult with your hosting company about this to get the correct configuration.
What about URIs under s2members restrictions?
URI Restrictions configured with s2Member® will function properly. Other Restrictions (like Posts, Pages, Categories, Tags) will not be functional, because this type of content does not fall under any of those. It’s custom content. That’s what s2Member’s URI Restrictions are for.
How can I protect files under
http://site.com/Non-WPFolder/filename.html ? It is a Non-WPFolder as you saw but content will only be available for members enrolling via paypal button generated by s2members.
Enable PHP inside .html files as mentioned above. Then follow the KB article example :-) Actually, you could skip the current_user_can()
checks that Raam gave in his example if you’re protecting this content through s2Member’s URI Restrictions. Instead, just add the include_once 'wp-load.php';
to the top of any HTML file.
<?php include_once 'wp-load.php'; ?>