Remove dates from post filenames
This commit is contained in:
parent
755db43747
commit
81597404c5
109 changed files with 110 additions and 11 deletions
26
source/_posts/apache-text-files.md
Normal file
26
source/_posts/apache-text-files.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
title: Prevent Apache from displaying text files within a web browser
|
||||
date: '2012-05-23'
|
||||
slug: prevent-apache-displaying-text-files-within-web-browser
|
||||
tags:
|
||||
- apache
|
||||
- code
|
||||
- drupal
|
||||
use: [posts]
|
||||
---
|
||||
{% block excerpt %}
|
||||
When you download [Drupal](http://drupal.org/project/drupal), there are several text files that are placed in the root of your installation. You don't want or need these to be visible to anyone attempting to view them in a browser - especially CHANGELOG.txt as that includes the exact version of Drupal you are running and could therefore have security implications.
|
||||
|
||||
Rather than delete these files or change the file permissions manually for each file, I can add the following lines into my VirtualHost configuration.
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
```language-apacheconf
|
||||
<Files ~ "\.txt$">
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
</Files>
|
||||
```
|
||||
|
||||
This prevents any files with a .txt extension from being accessed and rendered in a web browser.
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue