I have the following problem. When i add "RequestHeader unset Range" to my .htaccess I can view and open .pdf files on my website. But if I do so IOS devices can no longer access videos on my website, the video wont play. If I remove "RequestHeader unset Range" the videos work again but the pdf files do not. Unfortunatelly my hoster changed something. Before everything was running fine. Any idea how to fix this?
I tried the following:
<FilesMatch "\.(PDF|pdf)$">
RequestHeader unset Range
</FilesMatch>
But it does not work when i add the FilesMatch rule.
My request looks like this:
"GET": {
"scheme": "https",
"host": "domain.de",
"filename": "/de/user/recipe_pdf/2",
}
"Status": "416Requested Range Not Satisfiable",
"Version": "HTTP/2",
"Übertragen": "372 B (0 B Größe)",
"Referrer Policy": "strict-origin-when-cross-origin"
{
"Antwortkopfzeilen (372 B)": {
"headers": [
{
"name": "accept-ranges",
"value": "bytes"
},
{
"name": "cache-control",
"value": "max-age=0, must-revalidate, private"
},
{
"name": "content-disposition",
"value": "inline; filename=\"recipes.pdf\""
},
{
"name": "content-length",
"value": "0"
},
{
"name": "content-range",
"value": "bytes */972493"
},
{
"name": "content-type",
"value": "application/pdf"
},
{
"name": "server",
"value": "nginx"
}
]
}
}
The solution is:
<If "%{REQUEST_URI} =~ m#^.*/recipe_pdf/.*#">
RequestHeader unset Range
</If>