mirror of
https://github.com/phanan/htaccess.git
synced 2018-11-08 13:39:40 +01:00
Update README.md
This commit is contained in:
parent
2e25cf45be
commit
72cd2ccdec
1 changed files with 7 additions and 1 deletions
|
@ -14,6 +14,7 @@ A collection of useful .htaccess snippets, all in one place. I decided to create
|
|||
- [Force HTTPS Behind a Proxy](#force-https-behind-a-proxy)
|
||||
- [Force Trailing Slash](#force-trailing-slash)
|
||||
- [Redirect a Single Page](#redirect-a-single-page)
|
||||
- [Redirect a Single Directory](#redirect-a-single-directory)
|
||||
- [Redirect an Entire Site](#redirect-an-entire-site)
|
||||
- [Security](#security)
|
||||
- [Deny All Access](#deny-all-access)
|
||||
|
@ -91,6 +92,11 @@ Redirect 301 /oldpage2.html http://www.yoursite.com/folder/
|
|||
```
|
||||
[Source](http://css-tricks.com/snippets/htaccess/301-redirects/)
|
||||
|
||||
### Redirect a Single Directory
|
||||
``` apacheconf
|
||||
#RewriteRule ^source-directory/(.*) target-directory/$1
|
||||
```
|
||||
|
||||
### Redirect an Entire Site
|
||||
``` apacheconf
|
||||
Redirect 301 / http://newsite.com/
|
||||
|
@ -354,4 +360,4 @@ AddHandler application/x-httpd-php55 .php
|
|||
|
||||
# Alternatively, you can use AddType
|
||||
AddType application/x-httpd-php55 .php
|
||||
```
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue