mirror of https://github.com/phanan/htaccess.git
Added "Switch to Another PHP Version" section
This commit is contained in:
parent
21ed05d6ee
commit
2e25cf45be
11
README.md
11
README.md
|
@ -35,6 +35,7 @@ A collection of useful .htaccess snippets, all in one place. I decided to create
|
||||||
- [Force Downloading](#force-downloading)
|
- [Force Downloading](#force-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)
|
||||||
|
|
||||||
## Rewrite and Redirection
|
## Rewrite and Redirection
|
||||||
Note: It is assumed that you have `mod_rewrite` installed and enabled.
|
Note: It is assumed that you have `mod_rewrite` installed and enabled.
|
||||||
|
@ -344,3 +345,13 @@ AddDefaultCharset utf-8
|
||||||
AddCharset utf-8 .atom .css .js .json .rss .vtt .xml
|
AddCharset utf-8 .atom .css .js .json .rss .vtt .xml
|
||||||
```
|
```
|
||||||
[Source](http://h5bp.com)
|
[Source](http://h5bp.com)
|
||||||
|
|
||||||
|
### Switch to Another PHP Version
|
||||||
|
If you're on a shared host, chances are there are more than one version of PHP installed, and sometimes you want a specific version for your website. For example, [Laravel](https://github.com/laravel/laravel) requires PHP >= 5.4. The following snippet should switch the PHP version for you.
|
||||||
|
|
||||||
|
``` apacheconf
|
||||||
|
AddHandler application/x-httpd-php55 .php
|
||||||
|
|
||||||
|
# Alternatively, you can use AddType
|
||||||
|
AddType application/x-httpd-php55 .php
|
||||||
|
```
|
Loading…
Reference in New Issue