Apache .htaccess和特定文件的HTTP头
我需要以以下方式提供.crx文件:Apache .htaccess和特定文件的HTTP头,apache,.htaccess,Apache,.htaccess,我需要以以下方式提供.crx文件: 1) The file has the content type application/x-chrome-extension 2) The file is not served with the HTTP header X-Content-Type-Options: nosniff 3) The file is served with one of the following content types: - "text/plain" - "applicat
1) The file has the content type application/x-chrome-extension
2) The file is not served with the HTTP header X-Content-Type-Options: nosniff
3) The file is served with one of the following content types:
- "text/plain"
- "application/octet-stream"
- "unknown/unknown"
- "application/unknown"
我必须如何设置.htaccess文件才能这样做?规则1和规则3相互矛盾。最简单的方法是将其重命名为.php并使用: 我认为您不需要.crx扩展名。如果出于某种原因,您可以使用file.php/fake.crx,而不仅仅是file.php
<?
header('Content-Type: application/x-chrome-extension');
?>
...original-file-contents...