Page 1 of 1

restricted page and .htaccess

Posted: Sun Dec 18, 2011 12:57 pm
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