restricted page and .htaccess

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Locked
gianpiero
Forum Members
Forum Members
Posts: 221
Joined: Sun Jan 07, 2007 4:32 pm

restricted page and .htaccess

Post by gianpiero »

hi all

I prepared a restricted page in my cmsms using FEU, UPLOADS and CustomContent modules. I need to share contents and files in that page with a group of registered members. It works well, but I didn't like "file listing" in my page, as the module allow. I prefer to manage my page linking the files where and only when I want.

So I putted an .htaccess into the dir where protected files are stored, that limits/allows downloading of files only from the specified page.

htaccess is:

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_REFERER} !(www.)?mysite.com/restricted-page.html
RewriteRule .* - [F]
It works good. Do you think this is the best solution?
Any suggestion for an easiest way to do this inside CMSMS ?

thanks in advance
gp
Locked

Return to “The Lounge”