apache - Universal file protection for any doamin throug .htaccess -
I want to de-access PDF files for unregistered users. And I know how to do this through the .htaccess file
rewrite% {HTTP_REFERER}! ^ Http: //sub.mydomain.com/module RewriteRule \ .pdf $ - [L, F]
Only registered users can view the page
but I need this type of rule to fit any domain, something like this:
RewriteCond% {HTTP_REFERER}! ^ Http: //% {HTTP_HOST} / module rewriting ..pdf $ - [L, F]
Is this possible?
Just remove the host part and enter / module
as the referrer URL Check:
Rewind Conduit% {HTTP_REFERER}! / Module rewrite \ .pdf $ - [L, F]
but % {HTTP_REFERER}
is not a very strong check because the client can deceive it.
Comments
Post a Comment