- Server operating system version
- Ubuntu 24.04
- Plesk version and microupdate number
- 18.0.68 Update #2
I have it where you go to the ip4 address and all images show in the browser. I was able to accomplish this by adding RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?217.160.146.1(/)? [NC] to the htacces file. I tried to add RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?2607:b500:400::01(/)? [NC] and the images won't show in the browser. I tried adding the /64 and /80 CIDR. I tried to add short and long addresses of the ip address.
I have an example of what I am trying to use.
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainname.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainname.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?217.160.146.1(/)? [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?2607:b500:400::01(/)? [NC]
RewriteRule .*\.(jpg|jpeg|gif|ico|png|bmp)$ - [F,NC]
I have read this should work. There is something I am missing, and I am just too close to it to see the forest through the trees. How should I be writing the file for ip6? I have tried to find a resource only through searches and there are not any that I could find. Thank you for your assistance.
I have an example of what I am trying to use.
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainname.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainname.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?217.160.146.1(/)? [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?2607:b500:400::01(/)? [NC]
RewriteRule .*\.(jpg|jpeg|gif|ico|png|bmp)$ - [F,NC]
I have read this should work. There is something I am missing, and I am just too close to it to see the forest through the trees. How should I be writing the file for ip6? I have tried to find a resource only through searches and there are not any that I could find. Thank you for your assistance.