差異處
這裏顯示兩個版本的差異處。
| 兩邊的前次修訂版 前次修改 下次修改 | 前次修改 | ||
| apache [2016/11/29 17:19] – jz | apache [2017/02/28 00:32] (目前版本) – jz | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| ====== Apache ====== | ====== Apache ====== | ||
| + | |||
| + | ===== Hide server info ===== | ||
| + | <code apache> | ||
| + | Header unset Server | ||
| + | |||
| + | ServerSignature Off | ||
| + | ServerTokens Prod | ||
| + | </ | ||
| + | |||
| + | ===== Redirect ===== | ||
| Redirect with htaccess | Redirect with htaccess | ||
| - | < | + | < |
| # permanent | # permanent | ||
| Redirect 301 /google http:// | Redirect 301 /google http:// | ||
| # temporary | # temporary | ||
| Redirect 302 /google http:// | Redirect 302 /google http:// | ||
| + | # redirent home | ||
| + | RewriteEngine On | ||
| + | RedirectMatch 301 ~.+ http:// | ||
| </ | </ | ||
| + | |||
| + | User dir redirect | ||
| + | <code apache> | ||
| + | < | ||
| + | UserDir http:// | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | |||
| ===== SSLEngine ===== | ===== SSLEngine ===== | ||
| 行 47: | 行 69: | ||
| RewriteRule ^ https:// | RewriteRule ^ https:// | ||
| </ | </ | ||
| + | |||
| + | ref: | ||
| + | |||
| + | http:// | ||
| + | |||
| + | https:// | ||