Page 1 of 1

Prevent Direct Link to the Component URL

Posted: 31 May 2014, 19:25
by Mr_Anonymous
HI,

I have installed the phoca download for Joomla 3.3. I want to prevent download access to direct link based on HTTP Referrer. I read the tips here and I have saved these files outside public_html and set the absolute path in Phoca Download settings. This doesnt give the direct link to the pdf file since its placed outside root. However, the file can still be downloaded using the components direct link. Meaning, if someone types in the url like this, they can download it even if that link is placed in another website:

Code: Select all

http://127.0.0.1/mysite/index.php/download/category/2-category-1?download=1:super-file-1
So it is still downloadable using the components direct link although the file is placed outside root. How do I make sure that the file is only downloaded if the http referrer to that component link is from my site only? I dont want to restrict only for registered users. Rather all users can download it as long as the link is from my own site. How can I do that? What am I missing here?

Re: Prevent Direct Link to the Component URL

Posted: 01 Jun 2014, 23:27
by Jan
Hi, you need to set access rights too, so e.g. only registered user can download the file.

Re: Prevent Direct Link to the Component URL

Posted: 02 Jun 2014, 06:55
by Mr_Anonymous
Mr_Anonymous wrote:I dont want to restrict only for registered users. Rather all users can download it as long as the link is from my own site. How can I do that?
Hi Jan, is there a way to restrict based on http referrer instead of access rights?

Re: Prevent Direct Link to the Component URL

Posted: 04 Jun 2014, 15:56
by Jan
Hi, such needs to be done directly on the server, I think :idea:

Jan

Re: Prevent Direct Link to the Component URL

Posted: 05 Jun 2014, 14:42
by Mr_Anonymous
Thank you Jan. I'll look into the .htaccess and see if its possible to do it from there.

Re: Prevent Direct Link to the Component URL

Posted: 06 Jun 2014, 23:08
by Jan
Ok