Jump to content

Recommended Posts

Posted

I am trying to prevent direct linking to my images. Do I put the htaccess text file in my public.html of my c-panel or in the main folder of my domain and subdomains?

......

RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$

RewriteCond %{HTTP_REFERER} !^http://(www\.)?

dominateyourdestiny.net/.*$ [NC]

RewriteCond %{HTTP_REFERER} !^http://(www\.)?

dominateyourdestiny.net.*$ [NC]

RewriteRule \.(gif|jpg)$ http://dominateyourdestiny.net/evil.gif [R,L]

And is this correct?

Thanks :)

Posted

.htaccess goes in the public_html folder on your site.

 

you can also use cpanel to add hotlink protection

and add authorized sites.

This will add the necessary code to your existing .htaccess file for you.

Posted

Don

 

Strange thing after enabling hotlink protection my home page image is not viewable. All other pages are fine. When it is disabled the image comes up fine. Any thoughts?

Posted
Don

 

Strange thing after enabling hotlink protection my home page image is not viewable.  All other pages are fine.  When it is disabled the image comes up fine.  Any thoughts?

I've run into something similar when trying to enable this feature for some of my clients. Their images won't load at all and they don't load for any of the other pages, even though "http://whatevertheClientsiteis.com" is in the list. Do I have to list all the directories?

 

:)

Posted

I am finding hotlink protection does not always work right.

Sometimes I have to disable and later re enable because of the same problem.

I keep a text file of the authorized links to paste back in.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...