.htaccess set, but error when access some pdf files
am 12.09.2007 19:07:38 von zhangpingfanI configured my apache server to restrict the access of a group of pdf
files via my cgi program only.
The SetEnvIf is like follows:
SetEnvIf Referer "^http://www.myserver.com/myprog.cgi" local_referal
Order Deny,Allow
Deny from all
Allow from env=local_referal
When I access the pdf files, some of them could not be displayed.
But a retry later maybe success. i.e. the error is not repeatable.
The apache log files shows:
When error occurs, there are two requests for the same file, but in
the second, referrer is NULL.
10.1.1.1 - - [12/Sep/2007:10:35:15 +0900] "GET /myprog.cgi?
target=BC&caseNo=NSP061056 HTTP/1.1" 200 2348 "http://www.myserver.com/
index.htm" "Mozilla/4.0 (compatible; MSI
E 6.0; Windows NT 5.1; SV1; InfoPath.1; .NET CLR 2.0.50727; .NET CLR
1.1.4322)"
10.1.1.1 - - [12/Sep/2007:10:35:15 +0900] "GET /files/nsp061056.pdf
HTTP/1.1" 200 1179648 "http://www.myserver.com/myprog.cgi?
target=BC&caseNo=NSP061056" "Mozilla/4.0 (compatible; MSIE 6.0; Window
s NT 5.1; SV1; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)"
10.1.1.1 - - [12/Sep/2007:10:35:15 +0900] "GET /files/nsp061056.pdf
HTTP/1.1" 403 1762 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1; SV1; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)"
In a normal situation, only one request appears.
10.1.1.1 - - [12/Sep/2007:10:37:15 +0900] "GET /myprog.cgi?
target=BC&caseNo=NSP061044 HTTP/1.1" 200 2348 "http://www.myserver.com/
index.htm" "Mozilla/4.0 (compatible; MSI
E 6.0; Windows NT 5.1; SV1; InfoPath.1; .NET CLR 2.0.50727; .NET CLR
1.1.4322)"
10.1.1.1 - - [12/Sep/2007:10:37:15 +0900] "GET /files/nsp061044.pdf
HTTP/1.1" 200 1179648 "http://www.myserver.com/myprog.cgi?
target=BC&caseNo=NSP061044" "Mozilla/4.0 (compatible; MSIE 6.0; Window
s NT 5.1; SV1; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)"
The browser is IE6.
Could someone please shed some light on it?
Thanks in advance.