mirror of https://github.com/phanan/htaccess.git
Merge branch 'lukedmor-prevent-download'
This commit is contained in:
commit
30ee04ec23
|
@ -38,6 +38,7 @@ What I'm doing here is mostly collecting useful snippets from all over the inter
|
||||||
- [Set PHP Variables](#set-php-variables)
|
- [Set PHP Variables](#set-php-variables)
|
||||||
- [Custom Error Pages](#custom-error-pages)
|
- [Custom Error Pages](#custom-error-pages)
|
||||||
- [Force Downloading](#force-downloading)
|
- [Force Downloading](#force-downloading)
|
||||||
|
- [Prevent Downloading](#prevent-downloading)
|
||||||
- [Allow Cross-Domain Fonts](#allow-cross-domain-fonts)
|
- [Allow Cross-Domain Fonts](#allow-cross-domain-fonts)
|
||||||
- [Auto UTF-8 Encode](#auto-utf-8-encode)
|
- [Auto UTF-8 Encode](#auto-utf-8-encode)
|
||||||
- [Switch to Another PHP Version](#switch-to-another-php-version)
|
- [Switch to Another PHP Version](#switch-to-another-php-version)
|
||||||
|
@ -343,6 +344,14 @@ Sometimes you want to force the browser to download some content instead of disp
|
||||||
</Files>
|
</Files>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Prevent Downloading
|
||||||
|
Sometimes you want to force the browser to display some content instead of downloading it. The following snippet will help.
|
||||||
|
``` apacheconf
|
||||||
|
<FilesMatch "\.(tex|log|aux)$">
|
||||||
|
Header set Content-Type text/plain
|
||||||
|
</FilesMatch>
|
||||||
|
```
|
||||||
|
|
||||||
### Allow Cross-Domain Fonts
|
### Allow Cross-Domain Fonts
|
||||||
CDN-served webfonts might not work in Firefox or IE due to [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing). The following snippet from [alrra](https://github.com/h5bp/server-configs-apache/issues/32) should make it happen.
|
CDN-served webfonts might not work in Firefox or IE due to [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing). The following snippet from [alrra](https://github.com/h5bp/server-configs-apache/issues/32) should make it happen.
|
||||||
``` apacheconf
|
``` apacheconf
|
||||||
|
|
Loading…
Reference in New Issue