Ok, no replies but I want to offer a bit more. Perhaps it has to do with
the browser referrer value. When tested in old IE it works great. When
tested with the current Firefox version it doesn't work and the PDF
renders. Anyone know how to test what Firefox does different? The logs
don't show any difference in the values.

***
Regards,
Joe W Holt
Sr Programmer/Developer
Jack Onofrio Dog Shows, LLC
405.427.8181



From: "Joe W Holt" <joe.holt@xxxxxxxxxxx>
To: "Web Enabling the AS400 / iSeries" <web400@xxxxxxxxxxxx>
Date: 02/11/2018 03:10 PM
Subject: [WEB400] Apache Redirects to stop linking from other domains
not working
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxx>





Little bit at my wits end on this. I've tried so many different variations
of the redirect code but still can't get the server to halt serving PDF
files from other domains linking to them.

Here is my latest:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?ourdomain\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://(www\.)?ourdomain\.com/.*$ [NC]
RewriteRule ^.*\.(bmp|tif|gif|jpg|jpeg|jpe|png|pdf)$
https://www.ourdomain.com [R]

I was really just trying to stop two domains from linking to our pdfs but
that code didn't work either so I figured I'd try all domains. I don't
really care about the graphics, just the pdfs, but I left the code in place
from another example I followed.
If anyone could point me to what stops this from working or show how to
stop just a couple of domains that would be great. All code I find
references image linking but I figured a file is a file. Am I incorrect?

***
Regards,
Joe W Holt
Sr Programmer/Developer
Jack Onofrio Dog Shows, LLC
405.427.8181
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.