Hello
As a background there is one specific site we (for various reasons) don't allow to link to one directory in the nginx site.
Seems to be easy. If I put a PHP file in the directory it works just as wanted ie gives 403 error when accessed from unallowed domain (test so far). But the real contents I have to block is a flash-based e-book with a HTML file as the "head" of the flash. And when I access the html with the unwanted referer it opens the html and hence the flash.
My
(if $http_referer ~* (site-to-unallow|test-site)) {
return 403;
}
lies on the server level on a virtual host conf file (next to server_name, root and log-directives. I just don't get it, nor have I found any pointers from the Google-land...
Any suggestions?
hank
As a background there is one specific site we (for various reasons) don't allow to link to one directory in the nginx site.
Seems to be easy. If I put a PHP file in the directory it works just as wanted ie gives 403 error when accessed from unallowed domain (test so far). But the real contents I have to block is a flash-based e-book with a HTML file as the "head" of the flash. And when I access the html with the unwanted referer it opens the html and hence the flash.
My
(if $http_referer ~* (site-to-unallow|test-site)) {
return 403;
}
lies on the server level on a virtual host conf file (next to server_name, root and log-directives. I just don't get it, nor have I found any pointers from the Google-land...
Any suggestions?
hank