Background: I have a site that displays songs with the Post structure of .com/song/foo.html
I am adding every song to an additional child category called "private" that uses a different template (inserts premium content in custom fields), so the structure of the private versions of the Posts will be .com/song/private/foo.html.
Question: How can I edit the .htaccess file in our root folder to do the following:
- Block indexing and caching of the ".com/song/private/" folder;
- Block all access to the folder;
- Allow access for a logged-in Wordpress user;
- Allow referral access for any domains I add (so our content partners can list the private pages and allow their customers to click through);
- Allow referral access from any of other "/private/" song Post on our domain;
- For all others, redirect to the public version of the same post, structured .com/song/foo.html (same filename, just without the "/private/" before it)
We can use mod_rewrite. I have hacked my way through .htaccess edits before, but this is too much for me.
UPDATE: I have now added code to my root .htaccess allowing me to insert another .htaccess in the ".com/song/private/" folder that I need to protect. Now I just need the code to put there.