mirror of
https://github.com/h5bp/html5-boilerplate.git
synced 2026-01-08 22:28:10 -05:00
Remove apache-server-configs / .htaccess
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Extend and customise HTML5 Boilerplate
|
||||
# Extend and customize HTML5 Boilerplate
|
||||
|
||||
Here is some useful advice for how you can make your project with HTML5
|
||||
Boilerplate even better. We don't want to include it all by default, as not
|
||||
everything fits with everyone's needs.
|
||||
|
||||
* [Server Configuration](#server-configuration)
|
||||
* [App Stores](#app-stores)
|
||||
* [DNS prefetching](#dns-prefetching)
|
||||
* [Internet Explorer](#internet-explorer)
|
||||
@@ -19,6 +20,18 @@ everything fits with everyone's needs.
|
||||
* [humans.txt](#humanstxt)
|
||||
* [security.txt](#security.txt)
|
||||
|
||||
|
||||
## Server Configuration
|
||||
|
||||
We no longer include a [`.htaccess`](#htaccess) file for the [Apache HTTP
|
||||
server](https://httpd.apache.org/docs/) in HTML5 Boilerplate by default, however if you are
|
||||
using a web server, then we encourage you to checkout out the [server configuration](https://github.com/h5bp/server-configs)
|
||||
that corresponds to your web server and environment.
|
||||
|
||||
These repos offer a collection of configuration snippets that can help your server improve the
|
||||
website's performance and security, while also ensuring that resources are served with the
|
||||
correct content-type and are accessible, if needed, even cross-domain.
|
||||
|
||||
## App Stores
|
||||
|
||||
### Smart App Banners in iOS 6+ Safari
|
||||
|
||||
53
docs/misc.md
53
docs/misc.md
@@ -57,59 +57,6 @@ access to `.editorconfig` files, as they can disclose sensitive information!
|
||||
For more details, please refer to the [EditorConfig
|
||||
project](https://editorconfig.org/).
|
||||
|
||||
## Server Configuration
|
||||
|
||||
H5BP includes a [`.htaccess`](#htaccess) file for the [Apache HTTP
|
||||
server](https://httpd.apache.org/docs/). If you are not using Apache
|
||||
as your web server, then you are encouraged to download a
|
||||
[server configuration](https://github.com/h5bp/server-configs) that
|
||||
corresponds to your web server and environment.
|
||||
|
||||
A `.htaccess` (hypertext access) file is an [Apache HTTP server
|
||||
configuration file](https://github.com/h5bp/server-configs-apache).
|
||||
The `.htaccess` file is mostly used for:
|
||||
|
||||
* Rewriting URLs
|
||||
* Controlling cache
|
||||
* Authentication
|
||||
* Server-side includes
|
||||
* Redirects
|
||||
* Gzipping
|
||||
|
||||
If you have access to the main server configuration file (usually called
|
||||
`httpd.conf`), you should add the logic from the `.htaccess` file in, for
|
||||
example, a `<Directory>` section in the main configuration file. This is usually
|
||||
the recommended way, as using .htaccess files slows down Apache!
|
||||
|
||||
To enable Apache modules locally, please see [the Apache modules documentation](https://github.com/h5bp/server-configs-apache#enable-apache-httpd-modules)
|
||||
|
||||
In the repo the `.htaccess` is used for:
|
||||
|
||||
* Allowing cross-origin access to web fonts
|
||||
* CORS header for images when browsers request it
|
||||
* Enable `404.html` as 404 error document
|
||||
* Making the website experience better for IE users better
|
||||
* Media UTF-8 as character encoding for `text/html` and `text/plain`
|
||||
* Enabling the rewrite URLs engine
|
||||
* Forcing or removing the `www.` at the begin of a URL
|
||||
* It blocks access to directories without a default document
|
||||
* It blocks access to files that can expose sensitive information.
|
||||
* It reduces MIME type security risks
|
||||
* It forces compressing (gzipping)
|
||||
* It tells the browser whether they should request a specific file from the
|
||||
server or whether they should grab it from the browser's cache
|
||||
|
||||
When using `.htaccess` we recommend reading all inline comments (the rules after
|
||||
a `#`) in the file once. There is a bunch of optional stuff in it.
|
||||
|
||||
If you want to know more about the `.htaccess` file check out the
|
||||
[Apache HTTP server docs](https://httpd.apache.org/docs/) or more
|
||||
specifically the [htaccess
|
||||
section](https://httpd.apache.org/docs/current/howto/htaccess.html).
|
||||
|
||||
Notice that the original repo for the `.htaccess` file is [this
|
||||
one](https://github.com/h5bp/server-configs-apache).
|
||||
|
||||
## robots.txt
|
||||
|
||||
The `robots.txt` file is used to give instructions to web robots on what can
|
||||
|
||||
@@ -39,7 +39,6 @@ A basic HTML5 Boilerplate site initially looks something like this:
|
||||
│ └── vendor
|
||||
│ └── modernizr.min.js
|
||||
├── .editorconfig
|
||||
├── .htaccess
|
||||
├── 404.html
|
||||
├── browserconfig.xml
|
||||
├── favicon.ico
|
||||
@@ -74,17 +73,6 @@ This directory should contain all your project's JS files. Libraries, plugins,
|
||||
and custom code can all be included here. It includes some initial JS to help
|
||||
get you started. [About the JavaScript](js.md).
|
||||
|
||||
### .htaccess
|
||||
|
||||
The default web server configs are for Apache. For more information, please
|
||||
refer to the [Apache Server Configs
|
||||
repository](https://github.com/h5bp/server-configs-apache).
|
||||
|
||||
Host your site on a server other than Apache? You're likely to find the
|
||||
corresponding server configs project listed in our [Server
|
||||
Configs](https://github.com/h5bp/server-configs/blob/master/README.md)
|
||||
repository.
|
||||
|
||||
### 404.html
|
||||
|
||||
A helpful custom 404 to get you started.
|
||||
|
||||
Reference in New Issue
Block a user