差别
这里会显示出您选择的修订版和当前版本之间的差别。
| — |
amh4.2:nginx_rewrite_rule:opencart [2017/05/26 16:02] (当前版本) root 创建 |
||
|---|---|---|---|
| 行 1: | 行 1: | ||
| + | =====opencart在nginx下的伪静态规则===== | ||
| + | \\ | ||
| + | \\ | ||
| + | <code> | ||
| + | location / { | ||
| + | if (-d $request_filename) { | ||
| + | break; | ||
| + | } | ||
| + | if (-f $request_filename) { | ||
| + | break; | ||
| + | } | ||
| + | rewrite ^/(.+)$ /index.php?_route_=$1 last; | ||
| + | } | ||
| + | |||
| + | location /admin/ { | ||
| + | index index.php; | ||
| + | } | ||
| + | |||
| + | location ~* (\.(tpl|ini))$ { | ||
| + | deny all; | ||
| + | } | ||
| + | </code> | ||
最后更改: in 2017/05/26 16:02