<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title> Restrict access to a sub folder on a CMSB controlled site to logged in users only</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Restrict-access-to-a-sub-folder-on-a-CMSB-controlled-site-to-logged-in-users-only-82373</link>
        <description></description>
        <pubDate>Sun, 19 Jul 2026 14:38:19 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Restrict-access-to-a-sub-folder-on-a-CMSB-controlled-site-to-logged-in-users-only-82373" rel="self" type="application/rss+xml" />

                <item>
          <title> Restrict access to a sub folder on a CMSB controlled site to logged in users only</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245381#post2245381</link>
          <description><![CDATA[<p>Hi Dave,</p>
<p>Thanks for your detailed response.</p>
<p>I guess that if it becomes important enough to the client, I'll look to your paid support to dive into this further.</p>
<p>Best, and have a good weekend,</p>
<p>Jerry Kornbluth</p>]]></description>
          <pubDate>Fri, 29 Jan 2021 10:59:36 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245381#post2245381</guid>
        </item>
                <item>
          <title> Restrict access to a sub folder on a CMSB controlled site to logged in users only</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245380#post2245380</link>
          <description><![CDATA[<p>Hi Jerry, </p>
<p>I can't think of an easy clean solution.  To do it with PHP you'd need to add some code to all the 3rd party programs, and ensure that it didn't conflict with any of their code.  </p>
<p>Maybe if we set a PHP session variable to indicate if a user was logged in, that would be easier to check.  But you still have the issue that if any of the 3rd party apps are upgraded the code will be overwritten, and website membership would also need to clear that settings.</p>
<p>Tim's cookie idea is interesting, but you'd need to make sure people couldn't fake it since cookies are client side.  But maybe something along the lines of having htaccess code that redirects to the login page unless something is set that indicates a valid login.  </p>
<p>Or another approach is to only have the folder accessible through a time-expired URL or URL alias (eg: /members-j93dej7834/) that changes at intervals so it's not possible to guess it unless you can login.</p>
<p>But I can't think of an easy way to implement any of those without further research and custom code, and even then they seem a bit tricky.  </p>]]></description>
          <pubDate>Fri, 29 Jan 2021 10:32:40 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245380#post2245380</guid>
        </item>
                <item>
          <title> Restrict access to a sub folder on a CMSB controlled site to logged in users only</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245364#post2245364</link>
          <description><![CDATA[<p>I am, thanks for following up</p>
<p>Jerry Kornbluth</p>]]></description>
          <pubDate>Wed, 27 Jan 2021 08:28:18 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245364#post2245364</guid>
        </item>
                <item>
          <title> Restrict access to a sub folder on a CMSB controlled site to logged in users only</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245362#post2245362</link>
          <description><![CDATA[<p>Hi Jerry,</p>
<p>Just wanted to do a quick check in regarding this thread: are you still searching for a solution to restrict user access to sub-folders?</p>
<p>Please let us know if we can be of assistance.</p>]]></description>
          <pubDate>Wed, 27 Jan 2021 08:08:59 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245362#post2245362</guid>
        </item>
                <item>
          <title> Restrict access to a sub folder on a CMSB controlled site to logged in users only</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245314#post2245314</link>
          <description><![CDATA[<p>Hi Tim,</p>
<p>Interesting thought...</p>
<p>Maybe someone will come up with the magic formula.</p>
<p>Jerry Kornbluth</p>]]></description>
          <pubDate>Thu, 07 Jan 2021 17:27:16 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245314#post2245314</guid>
        </item>
                <item>
          <title> Restrict access to a sub folder on a CMSB controlled site to logged in users only</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245313#post2245313</link>
          <description><![CDATA[<p>I’d think that you may be able to achieve this by .htaccess and a cookie created with the login process? - but the specifics of how to implement that is way beyond me! very interested in how you progress though:)</p>]]></description>
          <pubDate>Thu, 07 Jan 2021 16:37:08 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245313#post2245313</guid>
        </item>
                <item>
          <title> Restrict access to a sub folder on a CMSB controlled site to logged in users only</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245312#post2245312</link>
          <description><![CDATA[<p>Hi Deborah,</p>
<p>Thanks for the lengthy response.</p>
<p>I've tried to do that kind of thing, and it has indeed worked for any of the CMS controlled pages.</p>
<p>Where I've been running into issues is when I've tried to implement that type of code on 3rd party programs. </p>
<p>Besides, there are sometimes a great many files in their programs and I was hoping for a more global approach that would keep non-logged in users from accessing the containing folder itself.</p>
<p>Maybe that can't be done, but I figured that it didn't hurt to ask.</p>
<p>Again, thanks,</p>
<p>Jerry Kornbluth.</p>
]]></description>
          <pubDate>Thu, 07 Jan 2021 16:26:07 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245312#post2245312</guid>
        </item>
                <item>
          <title> Restrict access to a sub folder on a CMSB controlled site to logged in users only</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245311#post2245311</link>
          <description><![CDATA[<p>Jerry, I no longer have any sites running Website Membership, but here's some code from my archives that might be helpful. I seem to remember this working when it was online.</p>
<pre class="language-markup"><code>&lt;?php // WEBSITE MEMBERSHIP START //
  // error checking
  $errorsAndAlerts = alert();
  if (@$CURRENT_USER)  { $errorsAndAlerts .= "&lt;a href=''&gt;Log Out&lt;/a&gt;&lt;br/&gt;\n"; }
  if (!$CURRENT_USER &amp;&amp; @$_REQUEST['loginRequired']) { $errorsAndAlerts .= "Please log in to continue.&lt;br/&gt;\n"; }
  // save url of referring page so we can redirect user there after login
  if (!getPrefixedCookie('lastUrl')) { setPrefixedCookie('lastUrl', @$_SERVER['HTTP_REFERER'] ); }
// WEBSITE MEMBERSHIP END //
?&gt;</code></pre>
<p><strong>WEB PAGE CONTENT:</strong></p>
<pre class="language-markup"><code>&lt;?php if (@$CURRENT_USER): ?&gt;
(show content for logged-in user)

&lt;?php if (@$errorsAndAlerts):
 // show errrors/alerts ?&gt;
&lt;div&gt;
&lt;?php echo $errorsAndAlerts; ?&gt;&lt;br&gt;
&lt;/div&gt;
&lt;?php endif ?&gt;

&lt;?php // endif current_user
endif ?&gt;</code></pre>
<p>If that doesn't work, I might have more code to delve into or someone else might have an immediate answer.</p>
<p>~ Deborah</p>]]></description>
          <pubDate>Thu, 07 Jan 2021 15:00:47 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245311#post2245311</guid>
        </item>
                <item>
          <title> Restrict access to a sub folder on a CMSB controlled site to logged in users only</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245310#post2245310</link>
          <description><![CDATA[<p>Hi All,</p>
<p>I'm trying to restrict access to a sub folder on a CMSB controlled site to logged in users only, on a site that's using the website membership plugin.</p>
<p>I'd rather that the users didn't have to enter another username and password, and that kind of eliminates the .htaccess route.</p>
<p>In addition to CMSB controlled pages, there are some 3rd party programs in the sub folder and I've tried hacking their page codes, but that really made a mess of things.</p>
<p>Any thoughts?</p>
<p>Thanks, and best wishes for a happier new year.</p>
<p>Jerry Kornbluth</p>]]></description>
          <pubDate>Thu, 07 Jan 2021 12:28:28 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245310#post2245310</guid>
        </item>
              </channel>
    </rss>
  